NS Basic/CE 8.2 Release Notes

February 12, 2010

© NSB Corporation. All rights reserved.

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


  1. Overview
  2. Installation
  3. How to run a sample program
  4. Requirements
  5. What's New
  6. Notes and Warnings
  7. Documentation
  8. Support

Welcome to NS Basic/CE 8!

NS Basic/CE 8 is a major update to NS Basic/CE. It adds a variety of new features and fixes a number of bugs. Major enhancements are:

  1. Gradient Buttons
  2. Creation of installers
  3. Vastly simplified installation and distribution of apps
  4. No separate runtime required
  5. Embedded resources
  6. HTML control
  7. Lots of other stuff as well. Read on below for more...
See the "What's New" section for a detailed list. If you are a current user upgrading to 8.1, reading the What's New section is essential.

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

NS Basic/CE 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/CE Handbook.

If you are using the Demonstration Edition

Welcome! You're running a complete copy of NS Basic/CE with just a few restrictions:
  1. The Demo will only run for 30 days.
  2. You can develop on the desktop, not the device.
  3. Apps you create will run on a device for 5 days.
  4. The line numbers on error messages when running on the device are 8 higher than in your actual listing.
To keep the download size down, we have lots more stuff on the website. Check the Documentation and Support sections below for important help.

NS Basic/CE Features

The easiest way to program Windows CE devices!

1. Overview

NS Basic/CE is made up of the following components:

Desktop IDE Allows you to write programs on the desktop. You can then download them to your device or the Microsoft Device Emulator, and test. The Desktop IDE can also be used to install the Device IDE.
Device IDE Lets you write programs on your device. You can run them directly from the Device IDE. This app includes the Device Visual Designer.
Device Visual Designer Lets you design the objects on your form, interactively. When you are done, the Visual Designer will generate the appropriate code and add it to your program.
ActiveX Controls ActiveX controls add functionality to NS Basic programs. You will find documentation and installation instructions under the Help menu for the Tech Notes and The Big Red Toolbox. You can add additional ActiveX controls to your program using the ActiveX Control Manager under the Tools menu in the IDE.

2. Installation

Step 1: Install the Desktop IDE

  1. Run NSBasic_CE.exe. 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)

Step 2: Install Device IDE (Optional)

If you want to use the Device IDE to do coding on the device itself, establish an ActiveSync connection, choose "Install Device IDE" from NS Basic/CE's Run menu, then follow the prompts on the screen and the device.

If your device is not running Windows Mobile, select the proper Platform in Tool...Options...Compile/Download.

Step 3: Install Emulator (Optional)

NS Basic/CE supports the Microsoft Device Emulator. If you would like to test programs on the desktop, you can download this separately from Microsoft. Read all about installing and using it in Tech Note 23, under the Help menu or on the net.

If you have problems during installation, see Tech Note 1. The solution is probably there.

3. How to run a sample program

  1. Start NS Basic/CE 8.2
  2. From the File Menu, select Open Sample Project...
  3. Choose HelloWorldStandard.
  4. Make sure you have a device connected via ActiveSync.
  5. Click Start in the Run Menu and follow the prompts.
  6. Hello World will be on the Program menu of your device.
There is a list of Tutorials on the Help menu that will help you get going.

3a. How to create and run a sample program in the Device IDE: (optional)

(full version of NS Basic/CE only)

  1. Start Basic and choose Benchmark from the list that appears.
  2. Tap on the green GO button.
  3. In ten seconds, the benchmark will complete. It counts loops per second - it will give you can idea how many statements NS Basic/CE can execute per second.
  4. Tap OK to view and modify the source code.

You could also start a new program, add this statement

	MsgBox "Hello World"
and run.

4. Requirements

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

Microsoft ActiveSync 4.5 (or later) or Windows Mobile Device Center (for Vista) required.

Programs written in NS Basic/CE will run on the following devices. For the full list, see Tech Note 21.

5. What's New


  1. IDE: Command line compile option added. See docs below.
  2. IDE: PNG Icon will also be looked for in the .ico file folder.
  3. IDE: Setting Optionbutton Alignment to 2 (center) no longer gets an error.
  4. IDE: Preserve is highlited as a keyword.
  5. IDE: Label object now has visible property
  6. IDE: New version of exProperties control (
  7. Installer: Bug in link to program fixed when installDir<>program name.
  8. Installer: DirToInclude can now be a list of directories, so more than one can be installed.
  9. Installer: If installDir is not specified, Shortcut is now created properly.
  10. Installer: Installer file is now named with the app's Title property.

Documentation Changes for Version 8.2.0

  1. You can now compile an NS Basic program from the command line. The format is nsbasic programName -compile. The programName should be a full path. Example:
    c:\program files\nsbasic\ce\nsbasic "c:\my projects\sample.nsb" -compile


  1. IDE: If you open another project, files in old project are now closed.
  2. IDE: Occasional crash on exit fixed.
  3. Installer: Extra entry in Start Menu not created when project title is blank.
  4. Installer: Recent file list is no longer overwritten.
  5. PictureBox: now sizes fonts properly in Hi Res mode.
  6. Runtime: New Constant: AppBuildStamp contains the build date and time.
  7. Runtime: New Function: SysInfo returns useful device information.
  8. Runtime: WinCE devices without PIE installed fixed.
  9. Tech Note 30: fixed image.


  1. Support added for Windows Mobile 6.5 Start Screen png icons.
  2. Tech Note 30 updated with information on WM 6.5 icons.
  3. Installer: Start Screen update no longer requires a reset in most cases.
  4. IDE: Error 91 when doing View Code fixed.
  5. IDE: Problems with application icon fixed.


  1. New Control: HTMLView. See Tech Note 42.
  2. IDE: Project now has Hi Res Aware property - see below.
  3. IDE: Project now has Dir To Install property - see below.
  4. IDE: Code Window: Now shows 16 lines in dropdown instead of 8.
  5. IDE: Extra blank lines are not longer added on each save.
  6. IDE: Form did not save Picture property.
  7. IDE: Loop is now highlighted as a keyword.
  8. IDE: Error 6 when selecting system color for gradient button fixed.
  9. IDE: Pocket PC VGA added to Option > Design Screen sizes.
  10. IDE: Bug when opening NS Basic/Desktop projects fixed.
  11. IDE: Better messages when object names are rejected in Properties.
  12. IDE: Error when pasting PictureBoxes and Gradient Buttons fixed.
  13. eVB2nsb: a number of enhancements have been made.
  14. Installer does not overwrite newer Basic.exe.
  15. Installer was deleting all files ending in .DAT
  16. New Function: SendMessageString - see below.
  17. PictureBox: DrawText was not sized properly on some devices (NSBCEPicturebox.ocx 1.3.2)
  18. Runtime: Fat executable now produced - see below.
  19. Runtime: Illegal character when loading program fixed.
  20. Runtime and IDE: Icon cleaned up.
  21. New Tech Note: 42 Using the HTMLview control
  22. New Sample: HTMLview

Documentation Changes for Version 8.1.0

  1. Hi Res Support: Some Windows Mobile devices have a screen size larger than 240x320. Devices with VGA screens are 480 x 640, for example. NS Basic/CE programs running on devices with different screen sizes have always looked exactly the same: the 240x320 coordinates are mapped on the VGA screen so everything is still in the same place and the screen completely filled.

    However, it is possible to use the extra pixels. By setting HiRes Aware to True in Project Properties, your program will treat the screen as it actually is 480 x 640. This will let you create smaller objects and smaller text.

    If you want your project to be Hi Res aware, but still run on regular devices, check output.height and output.width in your Form_Load routine. Adjust object bounds and font sizes if necessary.

  2. Dir To Install: Lets you specify a directory to be installed with your app. In Project Properties, you can now enter in the name of a folder in the project's directory. This folder (and its contents) will be included in the installer. It will be put into the home directory of your app on the device. This is a handy feature if you have a number of files to be included with your app, such as data, sounds or images: you no longer have to specify the name of each of these files.

  3. SendMessageString(): This function works just like SendMessage(), but allows a string as the last argument.

  4. Fat Executables: NS Basic/CE now produces a single exe file which contains the NS Basic runtime. While it increases the size of the program by about 200k, it eliminates the installation of \Program Files\nsbasic\Basic.exe, saving the same amount. One less directory is created in \Program Files and many registry entries are eliminated. The net result is a simpler installation. Launch times should also go down.

  5. Icons: To replace the default NS Basic icon in your app, create a .ico file and put its name into the Icon property in Project Properties. Which sizes are needed depending on what devices you are supporting. If you want to support all devices, you will need at least the following: 16x16, 21x21, 32x32, 43x43 and 64x64. A good free tool for making .ico files is IcoFX.


  1. Compiler: Projects with installer resources are smaller.
  2. IDE runs as Administrator so installer can be made.
  3. IDE: Bold on GradientButtons fixed.
  4. IDE: Changing platforms no longer requires resetting resource paths.
  5. IDE: CheckBox.Alignment can no longer be set to Center.
  6. IDE: Opening a sample project closes project already open.
  7. IDE: Paste Gradient Button fixed.
  8. IDE: Paths to resources in \Controls\ are no longer relative.
  9. New Sample: TeklogixScan for Teklogix devices.
  10. PictureBox 1.3.1 included
  11. PictureBox: Gradient Buttons now appear on older Window Mobile devices.
  12. PictureBox: Gradient Buttons now appear on Windows CE devices.


  1. Platform set properly in demo.
  2. Projects saved to root directory of a drive load OK now.
  3. Special characters are not allowed in pathname when creating installer.
  4. EULA and ReadMe in app directory no longer overwritten.
  5. F6 key now does Install App To Device.


  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. Smaller download - The complete NS Basic/CE is now just 15 megs.
  6. IDE: Alignment can now be set to center on some additional objects.
  7. IDE: More properties now have pickers.
  8. IDE: Now uses XP theme.
  9. IDE: Resources can be added to Project Explorer. (see below)
  10. IDE: Loaded apps go on recent files list, not just saved ones.
  11. IDE: New options to start program. (see below)
  12. IDE: New programs have "ShowOkButton True".
  13. IDE: New project properties for creating installers.
  14. Device IDE: Serial number automatically set on installation.
  15. Options: Square and landscape screen sizes added.
  16. Options: Device directory removed - now automatic.
  17. Options: New Installer screen (see below)
  18. NSCEPictureBox: ResourceBitmapIDstr added. (see below)
  19. NSCEPictureBox: Upgraded to Version 1.3.
  20. Runtime: New function: CreateShortcut. See below.
  21. Runtime: New function: GetResource. See below.
  22. Runtime: PlaySound can now play sounds that are saved as resources.
  23. Runtime: PictureBox can now display bitmaps that are saved as resources.
  24. Runtime: Error when exiting app on 6.1.4 devices fixed.
  25. Sample added: GradientButton
  26. Sample added: Resources
  27. Sample added: NetStreams (replacement for Microsoft's old Winsock)
  28. Samples: reorganized and cleaned up.
  29. Samples added to File menu.
  30. Help: Tutorials added to Help menu.
  31. Tech Note added: 41 Using Adobe Flash with NS Basic.
  32. Tech Notes 30 on installers completely redone.
  33. Tech Notes: some missing ones added.
  34. Installers: Support for devices before Windows CE 4.2 dropped.
  35. Installers: SQLite3 is now included.
  36. Installers: More modern look and feel, multiple language support.
  37. Installers: On recent devices, uninstalling one app will not affect others.
  38. Installation: Reduced from over 60 megs to 15.
  39. Installation: NS Basic/CE desktop installer now uses Inno Setup.
  40. Installation: Device controls are in \Program Files\nsbasic\CE\Controls
  41. Installation: Samples are in \My Documents\NSBasic Samples\CE
  42. Installation: The registry entry for .nsb has been corrected.

Documentation Changes for Version 8.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.

    At this time, gradient buttons are supported by Windows Mobile 5 and newer devices.

  2. Options Installer Screen: This screen controls options for creating the installer. If you have a Windows Mobile device, you probably do not need to change them. There is more information in Tech Note 30.

  3. Starting a program: The options on the Run menu have changed.

    Start: Saves your work, creates an exe file that can run on the device, then creates an installer for it. If "Run Automatically" is set in Options, the installer is started.

    Update App on Device: Use this if your app is already installed on the device and you just want to update your program's exe. If "Run Automatically" is set in Options, the app is started.

    Install Device IDE: The Device IDE is install and its serial number is set. You only need to do this if you want to program on the device.

  4. Resources: Resources are files that are associated with your project, to either be installed in the program's folder or embedded directly in your exe file. For more information on files to be installed, see Tech Note 30. Embedded files are covered next...

  5. 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.
  6. 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.

  7. CreateShortcut(Shortcut name, target path)

    Creates a directory shortcut to an executable. Returns true if successful, false if it cannot create the shortcut or it already exists. The target path should include quote marks, so it can be parsed properly.


    'This will create a link in the Programs folder to your program.
    err = CreateShortcut("\Windows\Start Menu\Programs\My Test.exe", """" & currentPath & """")
  8. 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.


    myPicturebox.ResourceBitmapIDstr = "GRADIENTBUTTON"
    See the "Resources" sample for more info.
  9. Support for older versions of Windows CE has been dropped: The installers for NS Basic were getting unncessarily complex: Windows CE devices as far back as 1996 were being supported. NS Basic/CE 8.1 supports devices using Windows CE 4.2 and later. Pocket PC 2003 and all Windows Mobile devices with touchscreens are supported, as well as Windows Mobile Embedded devices.

  10. Compatibility: NS Basic/CE 7 programs (and earlier) should load into NS Basic/CE 8.1 with no problem. NS Basic/CE 8.1 programs will not open in earlier versions, so keep a backup!

6. Notes and Warnings

  1. Programs created using the desktop IDE can be opened in the device IDE (and vice versa). However, the device Visual Designer cannot be used to edit programs created using the desktop IDE.
  2. Use ActiveSync 4.5.0 or later.
  3. The minimize button on Windows Mobile doesn't close your app: it just minimizes it. (That's Microsoft's implementation). The old version of your app is still running. You need to close the current app before downloading the new one. The easiest way to do this is to use Settings... System... Memory... Active Programs to kill the currently running one before downloading the new one.

    If you add the statement ShowOKButton True at the beginning of your program, the X in the top right will change to an OK button. Tapping that will close your app.

    There are also freeware apps, like TaskMgr from http://www.dotfred.net/TaskMgr.htm that make this easier by going on the taskbar.

  4. Starting with Windows Mobile 5 devices, OptionButton groups are not working properly on OptionButton objects that are added using the Forms designer. They work properly if added using the AddObject command in your Form_Open code. (We will fix this of course!)

Known Problems that are Microsoft's

  1. INPUTBOX does not size properly on most devices. This command is built into Microsoft's software. You can use the InputBox function that is part of the DialogX control to do the same thing. Putting this in your program will override the faulty InputBox function. (DialogX also provides additional functionality not contained in InputBox.)
    	FUNCTION INPUTBOX(prompt, title, default)
    	    ADDOBJECT "DialogX", "NSBIB_Dlg", 0, 0, 0, 0
    	    SET NSBIB=NSBIB_Dlg
    	  END IF  
    	  INPUTBOX = NSBIB.InputBox(prompt, title, default)
    	X=InputBox("Message area", "INPUTBOX Example", "Default Text")
  2. The EVAL statement doen't work on some devices. This appears to be a problem in Microsoft's compiler. Use the Execute statement instead.
  3. Date Object: Do not use a MSGBOX statement inside the Change event: it goes into a click event loop as MSGBOX generates its own events.

7. Documentation

  1. The NS Basic/CE Handbook. It is shipped with each copy of NS Basic/CE. It is approximately 240 pages and details all commands, functions and statement, with example for each of them.
  2. The Language Reference under the Help menu contains a summary of all statements, functions, objects and constants.
  3. Samples: A good selection of sample programs is installed in
    \My Documents\NSBasic Samples\CE\. You can also get to them directly from the File Menu. There are samples contributed by users in the Files section of our NS Basic/CE Web Board.
  4. 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.
  5. The Big Red Toolbox: A collection of controls and utilities submitted by NS Basic/CE users. Available on the Website, or on the CD.
  6. Tutorials: Under the Help Menu, you'll find a list of tutorials to help get you started.

8. Support

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

  1. The NS Basic/CE 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. Updates: From time to time, we may offer updates to NS Basic/CE modules for download at no charge. Check to be sure you're up to date!
  5. Microsoft On Line Help: Since NS Basic/CE uses the Windows CE VBScript Engine, your issue might be something that Microsoft has addressed in its Support Online section. If you enter "VBCE" or "eVB" as your question, you'll see a complete list of VBScript for CE 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 the email support - it works better and we do our best to respond quickly!
Copyright NS BASIC Corporation