NS Basic/Desktop 4.0
Release Notes

Jun 25, 2009

Copyright NS BASIC Corporation


Please read this document. We love getting questions from people who have done so!

Contents

  1. Installation
  2. How to run a sample program
  3. Requirements
  4. What's New
    What's New in 4.0.0
    What's New in 4.0.1
  5. Notes
  6. Documentation
  7. Support

Welcome to NS Basic/Desktop 4.0

NS Basic/Desktop 4.0 is a major update to NS Basic/Desktop, a tool to create apps for Windows desktop systems. We created this product since we saw a need for a development tool for desktop systems that would be as easy to use as our tools for handheld systems.

NS Basic/Desktop has an IDE that is similar to that of classic Visual Basic. The programming language is based on Microsoft's VBScript, which was designed as an easy to use, lightweight scripting language. It's solid and offers reasonable performance. When we realized the designers of VBScript had made it easy to add extensions to the language, it became possible to make a serious development tool.

We added extensions to the language in a couple of areas. Statements and functions were added to make the language complete enough for most applications. A set of standard intrinsic controls (Textbox, CommandButton, Popup and others) were added, so apps with a proper Windows look and feel could be created.

Most significantly, we added a powerful mechanism to use standard ActiveX controls. Thousands of these are available from Microsoft and third party developers. There is an ActiveX control for virtually every conceivable purpose: most are easily used from NS Basic/Desktop.

This allows NS Basic/Desktop programs to do some cool things. Besides providing all the usual features of a programming language, NS Basic/Decktop programs can easily interface with COM aware applications, such as Word, Excel and Outlook.

There are other things we did that are also important. The compiler produces a standalone exe file that is secure and easy to distribute. Unless you use ActiveX controls, no runtime libraries or installer are needed (not even MFC). Programs can be debugged using Microsoft's standard Script Debugger.

The implementation of NS Basic/Desktop is similar to NS Basic/CE. Code is almost completely portable between the two environments. The differences you will notice are in the screen size (Windows CE devices generally have much smaller screens) and the need to use versions of ActiveX controls that are designed for desktop versions of Windows.

See the "What's New" section for a detailed list of what is changed from previous versions.

Please visit our web site for the latest version of this document. You'll see the latest installation notes and updated news.

NS Basic/Desktop is a commercial software product, licensed subject to the License Agreement that must be must be agreed to before installation. The Agreement also appears in the NS Basic/Desktop Handbook.

If you are using the Demonstration Edition...

Welcome! You're running a complete copy of NS Basic/Desktop with just a few restrictions:
  1. The Demo will only run for 30 days.
  2. Apps you create will only run for 5 days.
When you buy the full version, you will be able to load programs written with the demo and use them without changes.

NS Basic/Desktop Features

The easiest way to program Windows!

Installation

If you have problems during installation, see Tech Note 01 for common solutions. The hotlinks in this section work if you are reading this document from the CD. Otherwise, if you downloaded the files, click on the file names on your system.

  1. Install NSBasic_Desktop.exe. (This link will work if you are running Internet Explorer. Otherwise, click on the file directly.) You may see the message "The publisher cannot be determined due to the problem below: Authenticode signature not found." It's safe to ignore this message.
  2. Enter your serial number into Register under the Help menu. (Not in Demo version)

Using the Microsoft Script Debugger

You don't need this to develop NS Basic/Desktop apps, but it can be a big help in debugging. Download it from Microsoft and install it. You will also need to add the statement AllowDebug=True to your program.

Installation Problems

See Tech Note 01 for solutions to common problems.


How to run Hello World:

This is everyone's first program!
  1. From the Windows Start menu, select 'Simple Hello World' within 'NS Basic Desktop'.
  2. The NS Basic/Desktop IDE will open to the program.
  3. Click Start in the Run Menu
  4. Hello World will run immediately.
  5. You can see the actual .exe file in \Program Files\nsbasic\Desktop\Samples.
There are also two tutorials under the Start Menu that will help you get going.

Requirements

You can develop programs using NS Basic/Desktop on the following platforms:

To use the NS Basic/Desktop Desktop, you need to have the following:


What's New

4.0.1

  1. IDE: CheckBox.Alignment can no longer be set to Center.
  2. IDE: Error 438 when adding objects fixed.
  3. IDE: Error 438 when using GOTO picker in module fixed.
  4. IDE: Gradient buttons were sometimes blank.
  5. IDE: Opening a sample project closes project already open.
  6. IDE: Paste Gradient Button fixed.
  7. NSBCEPictureBox 1.3.1 included

4.0.0

  1. Embed pictures, sound and files as resources.
  2. Gradient Buttons give a slick look and feel to Apps.
  3. Automatic creation of device installers.
  4. Smaller executables - programs are up to 1/3 smaller than before.
  5. Files can now be embedded in the exe and extracted at runtime, permitting single file distributions. (see below)
  6. IDE: Loaded apps go on recent files list, not just saved ones.
  7. IDE: Alignment can now be set to center on some additional objects.
  8. IDE: Bitmaps can be saved as resources in the exe file.
  9. IDE: More properties now have pickers.
  10. IDE: Now uses XP theme.
  11. IDE: Resources can be added to Project Explorer.
  12. IDE: Updated to XP theme.
  13. IDE: Error 425 when closing project fixed.
  14. IDE: ComboBox.Style=2 now works properly.
  15. IDE: Error 13 when using AppTitle fixed.
  16. IDE: Importing an NS Basic/CE project uses a properly sized form.
  17. NSCEPictureBox: ResourceBitmapIDstr added. (see below)
  18. NSCEPictureBox: Upgraded to Version 1.3.
  19. Runtime: Apps created now use XP theme.
  20. Runtime: New function: GetResource. See below.
  21. Runtime: PlaySound can now play sounds that are saved as resources.
  22. Runtime: PictureBox can now display bitmaps that are saved as resources.
  23. Sample added: GradientButton
  24. Sample added: Resources
  25. Sample added: NetStreams (replacement for Microsoft's Winsock)
  26. Samples: reorganized and cleaned up.
  27. Samples added to File menu.
  28. Help: Tutorials added to Help menu.
  29. Help: Command overview added to Language Reference
  30. Tech Note added: 41 Using Adobe Flash with NS Basic.
  31. Installers: SQLite3 is now included - SQLite2 is not.
  32. Installation: Installer now uses Inno Setup.
  33. Installation: Samples are in \My Documents\NSBasic Samples\Desktop

Documentation Changes for Version 4.0.0

  1. Gradient buttons: This new style of button gives apps a modern look and feel. The background color of the button transitions smoothly from one color to another, either vertically or horizontally. It is also useful as a background image. Complete details are in the Language Reference. See the "Gradient" sample as well.

  2. Embedding Files: You can now embed files in the main exe file, to be extracted and used and runtime. This results in a number of interesting possibilities:
    • Controls can be extracted, save as files and registered at runtime - simplifying or even eliminating the need for an installer.
    • Bitmaps can saved in the exe and displayed using a PictureBox - no separate file needs to be installed.
    • Sounds can be embedded in the exe and played, again without needing to install a separate file.
    • Store data for your program in the exe for use during runtime.
    To embed a file, add it as a Resource to the project. The GetResource function can be used to extract it, save it or register it.
  3. GetResource(Name[, [filename, register]])

    This powerful function allows you to do a number of things to resources contained in your app. The resources must already exist in your app: they must first be added in the IDE as Resources of type 'File' in the Project Explorer of the IDE.

    Use this function to:

    • Read the contents of a resource into a string in your program.
    • Copy the contents of a resource into a file.
    • Register and unregister controls.
    • Install an ActiveX control and register it.

    Complete documentation can be found in the Language Reference. See the "Resources" sample for more info.

  4. NSCEPictureBox.ResourceBitmapIDstr: This property gives the name of a bitmap (.bmp) resource to be displayed in a picturebox. The .ResourceFile property must also be set with the name of the file (an exe or dll) that contains the bitmap resource. It is similar to the .ResourceBitmapID resource, which only takes a resource number. The name must be in upper case.

    Example:

    myPicturebox.ResourceBitmapIDstr = "GRADIENTBUTTON"
    	
    See the "Resources" sample for more info.

Notes and Warnings

  1. If there is a compile or runtime error, the line number and error are reported. Use Edit...Goto line to go to the proper line in your program.
  2. If you have the Script Debugger installed and get an error, the Script Debugger will open to the proper line of code, but will not report the error message.

Documentation

  1. The NS Basic/Desktop Handbook. It is shipped with each copy of NS Basic/Desktop. It is approximately 130 pages and details all commands, functions and statements, with example for each.
  2. The Language Reference, under the Help menu, contains a summary of all statements, functions, objects and constants.
  3. Tech Notes: Detailed information on a number of topics is posted in a series of Tech Notes, in the Desktop IDE Help menu and posted on our web site.
  4. Sample Code: There are a number of samples in
    \Program Files\nsbasic\desktop\samples. There is an overview of the samples in http://www.nsbasic.com/desktop/info/technotes/TN05.htm.
  5. Tutorials: When you install NS Basic, two tutorials are installed on your system. You will find them under the Start Menu.
  6. Other Resources: Tech Note 3 has a list of additional information on VBScript and the Script Debugger.

Support

We're committed to delivering the best possible support. The following resources are available:

  1. The NS Basic/Desktop Web Board. Post questions and comments, and get answers in a public forum. The best and fastest way!
  2. Email Support: Send your questions to support@nsbasic.com
  3. Tech Notes: The Tech Notes posted on our web site give additional and specialized information on a wide variety of topics.
  4. Updaters: From time to time, we may offer updates to NS Basic/Desktop modules for download at no charge. Check to be sure you're up to date!
  5. Microsoft On Line Help: Since NS Basic/Desktop uses the Windows VBScript Engine, your issue might be something that Microsoft has addressed in its Support Online section. If you enter "VBScript" as your question, you'll see a complete list of VBScript issues.

We do not offer support by phone. Many problems involve looking at code and many solutions involve complex web addresses that don't communicate well by voice. Try our email support - it works better and we will respond quickly!
Copyright © NS BASIC Corporation