NS Basic/CE 7.0 Release Notes

Feb 4, 2008

Copyright 2008 NS BASIC Corporation


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

Contents

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

Welcome to NS Basic/CE 7.0!

NS Basic/CE 7 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. Windows Vista support added.
  2. Support for Windows Embedded CE 6.0 devices added.
  3. Language enhanced with Classes and Regular Expressions.
  4. Several major controls have more powerful and robust replacements.
  5. 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 7.0, 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 size down, not all files are included - but they're 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!

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 Windows CE or Pocket PC device, or the Microsoft Device Emulator, and test. The Desktop IDE can also be used to install the Device IDE and the Runtime.
Device IDE Lets you write programs on your device. You can run them directly from the Device IDE. This app includes the 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.
Runtime Must be present for NS Basic programs to run. It is not needed if the Device IDE is installed on the device. Unlike the Device IDE, you may distribute the runtime with your app with no charge. You can install the Runtime from the Run menu of the Desktop IDE, or directly from the file on the CD.
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.

See the sample "TwoForms" to see how to open and close forms from your program.




Installation

If you have problems during installation, see Tech Note 1 for common solutions. The hotlinks in this section work if you are reading this document from the CD. They will not work from FireFox: you will need click on the file names on your system directly.

Step 1: Install the Desktop

  1. Install 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 components

Windows Mobile and Pocket PC

This includes Windows Mobile 5 Pocket PC, Windows Mobile 5 Pocket PC Phone Edition, Pocket PC 2002, Pocket PC 2002 Phone Edition, Windows Mobile 2003, Windows Mobile 2003 Phone Edition, Windows Mobile 2003 Second Edition.

  1. Establish an ActiveSync connection from your PC to your device.
  2. In the Desktop IDE, choose Installers... on the Run Menu and select Basic.ppc.exe. (If you have the Demo, select RuntimeFat.ppc.exe)
  3. On Window Mobile 5 devices, you will have some additional prompts on the device.
    • "This program is from an unknown publisher..." Click on "Yes".
    • "Choose a location:" Select "Device".

Windows CE Embedded Devices

This includes devices running Windows CE.NET 4, Window CE 5.0, and Windows Embedded CE 6.0, other than Windows Mobile, Pocket PC or SmartPhone devices.

  1. Establish an ActiveSync connection from your PC to your device.
  2. In the Desktop IDE, choose Installers... on the Run Menu and select Basic.WinCE.exe. (If you have the Demo, select RuntimeFat.WinCE.exe)

Palm size PC

Palm-size PC devices use Windows CE 2.11. They were built 1999-2000 by a variety of manufacturers.

  1. Establish an ActiveSync connection from your PC to your Pocket PC.
  2. If you have an older version of NS Basic/CE installed, remove all NS Basic modules using the Remove Software feature in Settings.
  3. Install the WCELoad.exe Update.* This update from Microsoft runs without putting anything on the screen.
  4. In the Desktop IDE, choose Installers... on the Run Menu and select Basic.ppc.exe. (If you have the Demo, select Runtime.ppc.exe)
  5. Install Script* and System*

HPC2000, HPC Pro and HPC

These are usually clamshell-style devices with keyboards, running Windows CE 2.10 to 3.0. They were built by a variety of manufacturers from 1998-2003.

  1. Establish an ActiveSync connection from your PC to your Windows CE device.
  2. If you have an older version of NS Basic/CE installed, remove all NS Basic modules using the Remove Software feature in Settings.
  3. In the Desktop IDE, choose Installers... on the Run Menu and select Basic.hpc.exe. (If you have the Demo, select Runtime.hpc.exe)
  4. Install Script* (Not required for HPC 2000)
  5. Install System* (Not required for HPC 2000)
  6. If you have an HP 680, use this special version of Script*.

HPC users: The installers will put NS Basic/CE 2.11 on your device. Microsoft has not updated its development tools for these older devices, so we unfortunately cannot update our product. Since the HPC devices were phased out in 1998, this should not be an issue for many people.

Step 3: Set your Serial Number on the device (not in Demo)

  1. Under the Help Menu, go into Register...
  2. Click on 'Set Device'.

Step 4: 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.

* This link only works if this document is on the NS Basic CD and you are running Microsoft Internet Explorer. Otherwise, locate the file with the name and click on it. If you have not downloaded the file already, it may be on our website.


How to run a sample program from the Desktop

  1. From the Windows Start menu, select Hello World within NS Basic/CE.
  2. Make sure you have a device connected via ActiveSync.
  3. Click Start in the Run Menu.
  4. Hello World should be running on your device.
There are also two tutorials under the Start Menu that will help you get going.

Before you can load your program to test it again, you will have to close it on the device. This isn't as obvious as it looks on a Pocket PC device. The "X" button on the top right corner is actually a minimize button, not a close button, following the rules for all Pocket PC apps.

The easiest to actually close the app is use Settings... System... Memory... Active Programs to stop it before downloading the new one. There are also freeware apps, like Magic Button, that allow you to do this from the Taskbar. See "Notes and Warnings" below for more information.

How to create and run a sample program on the device (Pocket PC)

Not in the demo. You can download and run apps you create on the desktop using the demo, however.

  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.
  4. Tap OK to view and modify the source code.

How to create and run a sample program on the device (Other than Pocket PC)

Not in the demo. You can download and run apps you create on the desktop using the demo, however.

  1. From Basic, tap File...Open...BASIC Samples...Benchmark.
  2. Tap on the right arrow icon.
  3. In ten seconds, the benchmark will complete.
  4. Tap Benchmark.nsb to view and modify the source code.

A directory called BASIC Samples will also get installed in "My Handheld Computer". You can tap on these programs to start BASIC and run them.


Requirements

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

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

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


What's New

7.0.5

  1. Code Window: Error 5 in Ctl F fixed.
  2. Code Window: Go To line number should always go to correct line now.
  3. IDE: Change tab order - fixed error 438 on exiting.
  4. Intermittant Error 429 messages after installation fixed.
  5. Missing objects on open project in Vista fixed.
  6. New Sample: API.InputBox
  7. New Sample: API.DialogBox creates a floating dialog box
  8. New TechNote 40: Differences between Visual Basic 6 (VB6) and NS Basic/CE

7.0.4

  1. Compiler: Encoding for characters 128-255 in exe files fixed.
  2. IDE: Doing Start after Make will start the exe file.
  3. IDE: Background grid on Design Screen draws properly on Vista
  4. IDE: End Select is properly colored
  5. IDE: Limit of 32k in TextBox.MaxLength property removed - will now be limited by Windows at runtime.
  6. Code Window: ListBox hints now include List and ListCount
  7. New ListBox property: SpinBox. See below.
  8. New Function: SendMessage sends OS messages. See Below.
  9. New Sample: SMS Send sends a text message from a phone device.
  10. Updated Sample: NewObjects has SpinBox.
Documentation Changes for Version 7.0.4
  1. ListBox.SpinBox property: Setting this new property to True will change the appearance of a ListBox to have arrows on the right side which can be used to cycle through the values. This feature is useful if you need a ListBox but have very limited screen space. See the NewObjects sample to see it in action. This feature will only work on Pocket PC devices.
  2. SendMessage(hwnd, uMsg, wParam, lParam) passes directly through to the Windows call of the same name. It's a very powerful function with all sorts of uses. Please consult Microsoft's API documentation for full information.

7.0.3

  1. Hardcopy Handbook and Language Reference now available auf Deutsch.
  2. ActiveX Control Manager: Copy to Clipboard now works reliably.
  3. Code Window: 'End Property' highlights properly.
  4. Code Window: Date property displays for Date and Time objects.
  5. Code Window: More keywords and constants colored.
  6. IDE: Tools Menu: now accepts links in \program files\nsbasic\CE\tools
  7. IDE: Changes are saved after each replace.
  8. IDE: Error when setting invalid value to Appearance property fixed.
  9. IDE: Espaņol can now be selected in Tools...Options. (Thanks, Jose Adell!)
  10. IDE: German Language Reference file converted to .chm for Vista
  11. IDE: Japanese Language Reference file converted to .chm for Vista
  12. IDE: Start Menu: Link is to new Help file.
  13. IDE: The last item on a menu can now be deleted.
  14. IDE: When opening a .txt file, existing .nsp with same name is ignored.
  15. IDE: Incorrect message on opening menu fixed.
  16. Runtime: Declare Sub now works properly.
  17. RuntimeFat installers now register NSBWin32 properly.
  18. ShowFullScreen fixed. ShowFullScreen True/False

7.0.2

  1. Exe files now handle extended characters properly.
  2. Some ActiveX objects were disappearing from programs on reload.
  3. Redundant code was being added to the Generated Code section.
  4. Some objects were not generating events on older (pre CE 4.0) devices.
  5. Modules can open properly in Windows 98.

7.0.1

  1. Virtual CE only shows on the Tools menu if it is in the Tools folder.
  2. String and Color constants are now colored as keywords.
  3. WaveVolume function added to docs.
  4. NSExecute statement added -- see below.
  5. ActiveX events on subsequent forms fixed.
  6. DECLARE: now supports underbar character in function names.
  7. Langage Reference updated.
Documentation Changes for Version 7.0.1
  1. NSExecute Statement: NS Basic/CE has always had an Execute statement. MIcrosoft has added an Execute (and ExecuteGlobal) statement of their own to VBScript (copying us?) Now that we are using VBScript 5.6, Microsoft's function will be called instead of NS Basic/CE's. If you want to continue to use NS Basic/CE's version of the function, use NSExecute instead of Execute.

    In most cases, Execute will do as you expect. If you are using it in a subroutine, any variable or subroutine you create will only be around while you are in the subroutine. If you want the variable or subroutine to stick around after your function ends, then use ExecuteGlobal.

    The difference we have found with NSExecute is that AddObject statements are able create objects that send events back to your program.

7.0.0

  1. Windows Vista support added.
  2. Support for Windows Embedded CE 6.0 devices added.
  3. Language enhanced with Classes and Regular Expressions.
  4. ActiveX Controls: ToolBox now shows new controls.
  5. ActiveX Controls: ActiveX Control Manager now shows all coClasses of controls.
  6. ActiveX Controls: New controls are in the default list in ActiveX Control Manager.
  7. ActiveX Controls: Microsoft's CE controls now have their own installers: MSCEControls. See below.
  8. ActiveX Controls: New SerialTools control, replacing MSCEComm.dll. More robust, BlueTooth support added. See Tech Note 5.
  9. ActiveX Controls: New NSBComDlg.dll control, replacing the buggy MSCEComDlg control. See Tech Note 4.
  10. ActiveX Controls: New NSBControls.dll control, replacing MSCEListView.dll and MSCEImageList.dll. See Tech Notes 11 and 12.
  11. ActiveX Controls: NSBWin32.dll replaces MGCEWin32.dll. See Tech Note 16.
  12. ActiveX Controls: New SQLite 3 Control, replaces SQLite 2. See Tech Note 15.
  13. ActiveX Controls: ActiveX Control Manager - Entries were getting lost if there were too many.
  14. Compiler: Exe files now support Japanese and other multi byte languages.
  15. Device Installers: 'ARM42' installer renamed 'WinCE' to more accurately reflect the devices supported.
  16. Device Installers: Install to \%ce1%\ instead of Program Files. Works better on non-English systems.
  17. Device Installers: Symbol MC3000 fixed.
  18. Documentation: Date Object: It should be LongFormat, not FormatLong.
  19. Documentation: Handbook updated extensively.
  20. Documentation: Help file format changed from hlp to chm format.
  21. Documentation: New Tech Note 19 on Regular Expressions.
  22. Documentation: New Tech Note 29 on Classes.
  23. Documentation: New Tech Notes on SerialTools (05), SQLite3 (15), NSBComDlg (04), ListView (12), ImageList (11).
  24. Documentation: Tech Notes renumbered.
  25. Documentation: ReadMe is now on the Help menu - people might read it!
  26. IDE: Code Window: Lines ending in _ are syntax checked properly.
  27. IDE: Code Window: Loop is syntax checked properly.
  28. IDE: Code Window: More keywords are colored.
  29. IDE: Code Window: Intrinsic controls now show hints for methods as well as properties.
  30. IDE: Setting Frame.Visible is set to false in IDE fixed.
  31. IDE: PictureBox.Picture no longer brings up a file browser.
  32. IDE: Problem with opening projects on network drives fixed.
  33. IDE: PropertiesList control updated - more properties show for ActiveX objects.
  34. IDE: Save will always save as .nsb, unless you use Save as TXT option.
  35. IDE: Scrrun.dll is no longer used - less complaints from anti-virus software.
  36. Language: New GetRef function - See Language Reference.
  37. Language: New Class Object - See Language Reference.
  38. Language: New Escape, Unescape Functions - See Language Reference.
  39. Language: New ExecuteGlobal function - See Language Reference.
  40. Language: New GetLocale, SetLocale function - See Language Reference.
  41. Language: New With statement - See Language Reference.
  42. Language: New SpecialFolder function. See Language Reference.
  43. Runtime: Max number of args on a DECLARE increased from 10 to 20.
  44. Runtime: Memory leak on non Windows Mobile devices fixed.
  45. Runtime: Runtime error messages show properly on WCE devices.
  46. Runtime: Change event on Textbox fixed again.
  47. Virtual CE is no longer distributed with NS Basic/CE. (See Below)
Documentation Changes for Version 7.0.0
  1. New Controls: We have added a number of new controls to this release, replacing the old Microsoft CE controls, which have not been updated since 2000 and are no longer supported. The new controls have additional features and fix bugs, while supporting as much of the same feature set as possible.

    These controls work on Windows CE 4.0 devices and later. For older devices, use the MSCEControls (see below).

  2. IDE: Errors in Form_Load are now handled properly. Until now, if you had an error in a Form_Load routine, the routine would exit silently and continue execution. Version 7 fixes this for device running Windows CE 4.0 and newer. As a result, applications that seemed to be working may now raise errors which are finally being reported properly.
  3. Virtual CE made it easier for people to develop NS Basic programs by putting a live image of a connected CE device on the desktop. Now that Microsoft has a good Device Emulator (see the Tech Note), there isn't as much need for it. If you would like to continue to have this feature, you have 3 options:
    1. From your NS Basic/CE 6 installation, make a copy of \Program Files\nsbasic\ce\tools\v_ppc.exe. From your device, get the file \Program Files\nsbasic\v_remote.exe. Put them back into the same locations after installing NS Basic/CE 7.0. The Start Virtual CE option will reappear on the Tools menu.
    2. Get a copy of the full version from Handango. It has many features not in the Lite Edition, for $19.95 USD.
    3. Use the Remote Display Control for Pocket PC, free from Microsoft: <http://www.microsoft.com/technet/prodtechnol/wce/downloads/ppctoys.mspx>
  4. MSCEControls: While a number of the Microsoft CE controls have been replaced by new controls, they are still available. The MSCEControls installers for PPC, HPC and WIndow CE install the complete set on your device. You only need this installer if you are using old controls that have been replaced.

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. Make sure the version of ActiveSync you are using is 3.7.1 Build 4034 or later. The build number is important!
  3. The minimize button on a Pocket PC 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. On 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.)
    	DIM NSBIB
    	FUNCTION INPUTBOX(prompt, title, default)
    	  IF ISEMPTY(NSBIB) THEN
    	    ADDOBJECT "DialogX", "NSBIB_Dlg", 0, 0, 0, 0
    	    SET NSBIB=NSBIB_Dlg
    	  END IF  
    	  INPUTBOX = NSBIB.InputBox(prompt, title, default)
    	END FUNCTION  'INPUTBOX
    
    	X=InputBox("Message area". "INPUTBOX Example", "Default Text")
  2. CommonDialog ActiveX Control on Palm-size PC: the showColor method is not supported and the showFont method not resized for Palm-size screen. Microsoft has admitted this is a result of working to get that product out quickly.
  3. On HP 680 devices, the INPUTBOX function causes an Out of Memory error. The cause appears to be HP using a bad build of VBScript.dll in their ROM. Use the Script68 install module to fix this.
  4. On Palm-size devices, concatenating a string to a boolean causes an error.
  5. The EVAL statement doen't work on some devices. This appears to be a problem in Microsoft's compiler. Use the Execute statement instead.
  6. 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.

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 with NS Basic/CE into \Program Files\nsbasic\ce\samples.
  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. Sample Code: The best samples to start with are installed with NS Basic in \Program Files\nsbasic\ce\Samples. There are more samples contributed by other users in the Files section of our NS Basic/CE Web Board.
  6. The Big Red Toolbox: A collection of great controls and utilities submitted by NS Basic/CE users. Available on the Website, or on the CD.
  7. Distribution Tools: Ready to distribute your app? Read Tech Notes 30 and 31.
  8. Tutorials: When you install NS Basic, two tutorials are installed on your system. You will find them under the Start Menu.


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. Updaters: 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 2008 NS BASIC Corporation