NS Basic/CE 2.10

Release Notes

November 18, 1999

 

Welcome to NS Basic/CE 2.10!

The next generation of NS Basic/CE is here, adding support for Palm-size PC devices and a new Visual Designer tool, as well as a host of other new features and improvements.

NS Basic/CE 2.1 runs on all HPC Pro and Palm-size PC devices running Windows CE 2.11. It also works on HPC units running Windows CE 2.0.

This document contains what you need to know to install and run NS Basic/CE.

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

In addition to the documentation in the Handbook, there are a series of Tech Notes on important topics on this CD. You can get the latest versions of the Tech Notes on our website.

Contents

 


How to do a new installation of NS Basic/CE (from CD)

You can install NS Basic/CE directly from this document. For each of the files, click on the link and select the option "Run this program from its current location".

From there, just follow the prompts.

Before installing, be sure your device is connected and synched using Windows CE Services.

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.

Install Instructions

1. Uninstall all NS Basic modules using the Remove Software feature in Settings. IMPORTANT!

2. Install Basic

3. Install Script

4. Install System.

5. If you have a Palm-size PC, tap [Start]...[Programs]...[Register BASIC]. A number of system messages will be displayed as modules are registered, then the BASIC Serial number dialog will show up. Enter your serial number and exit.

6. If you have an HPC or HPC/Pro, run BASIC Installer on your device to enter your serial number. It's in your root folder.

7. If you have an HP 680, use this special version of Script.

 

How to Upgrade from NS Basic/CE 2.0

This procedure will only work if you already have NS Basic/CE 2.0x installed on your device. Do not remove any software before installing NS Basic/CE 2.10.

You can install NS Basic/CE directly from this document. Click on the link and select the option "Run this program from its current location".

From there, just follow the prompts.

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.

Install Instructions

1. Install Upgrade210. If you asked whether it is OK to overwrite files, answer Yes.

 

How to run a sample program

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.

If you have problems during installation, check the Tech Note for common solutions.


What's New in 2.0 and 2.1

New features in 2.1

1. CurrentPath: New global variable. Contains the pathname to the currently running program.

2. NSBVersion: New global variable. Contains the current version number as a string.

3. New Tag property: All intrinsic objects now have a tag property. Use this to store string data of your own.

4. New BorderStyle property: TextBox, Label, Date and Time all allow you to set the border style to 0 (none, the default) or 1 (show a 1 pixel border). Visual Designer has been updated to edit this property.

5. New HWND property: This returns the handle to the object. This is useful in conjunction with the VBCEUtil Control.

6. Tech Notes: are now included on the release CD.

7. Visual Designer: Snap To option added to Objects menu to move objects.

8. Visual Designer: You can set the grid size from the Objects menu.

9. Visual Designer: Pickers added for fontname, fontsize and scrollbars.

10. Visual Designer: New property called List added to ListBox and ComboBox objects. Put your list of items in and your pick list will be generated automatically. Items you add will be taken as strings, unless you follow them with a ' sign, in which case they are evaluated. Example:

   
   Monday
   Tuesday
   NOW '
   DATEADD(NOW, 10, "s") '
   Wednesday

11. Visual Designer: Modified to use less memory in programs with many forms.

12. Editor: You can save a program as a text file by giving it a ".txt" suffix in the SAVE AS dialog.

13. Editor: You can load a text file as a program by reading it in with a ".txt" suffix. In combination with the previous item, this makes editing programs on a desktop machine much easier.

14. PlaySound(file, hmod, flags): The PlaySound function plays a sound specified by the specified file, resource, or system event.
File Name of the file to play. NULL to stop playback.
Hmod 0 or handle to executable file with resource to load.
Flags SND_APPLICATION The sound is played using an application-specific association.
SND_ALIAS &h00010000 The file parameter is a system-event alias in the registry or the WIN.INI file. Do not use with either SND_FILENAME or SND_RESOURCE.
SND_ASYNC &h00000001 The sound is played asynchronously and PlaySound returns immediately after beginning the sound. To terminate an asynchronously played waveform sound, call PlaySound with file set to NULL.
SND_FILENAME &h00020000 The file parameter is a filename.
SND_LOOP &h00000008 The sound plays repeatedly until PlaySound is called again with the file parameter set to NULL. You must also specify the SND_ASYNC flag to indicate an asynchronous sound event.
SND_MEMORY &h00000004 A sound event's file is loaded in RAM. The parameter specified by file must point to an image of a sound in memory.
SND_NODEFAULT &h00000002 No default sound event is used. If the sound cannot be found, PlaySound returns silently without playing the default sound.
SND_NOSTOP &h00000010 The specified sound event will yield to another sound event that is already playing. If a sound cannot be played because the resource needed to generate that sound is busy playing another sound, the function immediately returns FALSE without playing the requested sound. If this flag is not specified, PlaySound attempts to stop the currently playing sound so that the device can be used to play the new sound.
SND_NOWAIT &h00002000 If the driver is busy, return immediately without playing the sound.
SND_RESOURCE &h00040004 The file parameter is a resource identifier; Hmod must identify the instance that contains the resource.
SND_SYNC &h00000000 Synchronous playback of a sound event. PlaySound returns after the sound event completes.
Sample

PlaySound "startup",0,1 'play async
Sleep 500
PlaySound 0,0,0 'stop it after .5 secs


15. KillFocus: new global function - sets focus to the outbox box. It therefore sets the focus to nothing.

New Features in 2.0

1. Date Object: Puts up a date picker. When tapped, it pops up a calendar which can be used for rapid selection of dates. Not available on HPC devices.

Properties: The usual position, font and visibility properties, plus longFormat (true/False), min, max, value

Events: change, dropDown

'Demonstrate Date and Time objects

addobject "date","d",20,0,200,20
d.longformat=true
d.fontbold=true

addobject "date","ds",20,30,200,20

addobject "time","t",20,60,200,20

sub d_change
  msgbox "date changed"
end sub

sub d_dropdown
  msgbox "date dropdown"
end sub

2. Time Object: Puts up a time picker. Use up and down arrows to select a time. Not available on HPC devices.

Properties: The usual position, font and visibility properties, min, max, value

Events: change

Example for Date and Time:

3. FIND and Replace: The FIND command in the Editor has been enhanced to allow the found text to be replaced.

4. WAITCURSOR TRUE|FALSE: Command. This new command allows you to put up the hourglass wait cursor to let the user know that the program is processing.

5. EXECUTE "filetype:filename" New feature added to Execute command that allows statements in files to be executed. Execute continues compile and execute strings that are supplied as its argument. If the string starts with filetype: , the remainder of the string is used as the file name. This feature is only available for development NS Basic/CE - not to the RunTime. Possible values for filetype are:

file

ascii file

execute(file:myAsciiFile.txt")

ascii

ascii file

execute(ascii:myAsciiFile.txt")

unicode

Unicode file

execute(unicode:myUnicodeFile.txt")

 

6. Close button: New feature. Sends form_close event when the close box (top right corner) is tapped as a program is running. This will not interrupt a hard code loop. Be reasonable when using this feature: since the intent is to shut down the BASIC runtime environment, not all possible code will make sense.

sub form_close
msgbox("Quitting time!")
end sub

7. Palm-size PC's: Support has been added for the new generation of Palm-size PC's using Windows CE 2.11. The software will not work on earlier Palm-size PC's. All dialog boxes have been resized to fit the smaller screen, and the command bar has been shortened to fit. Programs written for the HPC and HPC Pro will run without modification, however, you need to make sure your objects are properly sized for the smaller screen. The on screen keyboard is supported for the entry of code.

8. TextBox object: New properties have been added to control text selection. They are

selStart

integer

The start position of the selection text

selLength

integer

The length of the selected text.

selText

string

The selected text

9. ShellExecute verb, file [,parms] This new function executes an external program as a new process. The BASIC environment continues to run.

Verb

What it does

Example

Open

Runs a program

shellExecute "open","regsvrce.exe","\windows\s309picture.dll"

Print

Sends a document to the printer (not available on all Windows CE devices)

ShellExecute "print","myReport.doc"

Explore

Opens Pocket Internet Explorer

shellExecute "explore", "myPict.jpg"

 

10. KeyboardStatus global variable and keyboardStatusChanged event: Use the KeyboardStatus global variable to check or set whether the soft input panel is open. When the panel is opened or closes, the keyboardStatusChanged event is sent to your program. Use the bounds variable in the Output object to see what the new screen size is. (Palm-size PC only)

11. TRACE: This is a new option on the Run command in the Tools menu. As the program runs, the line number and code for each statement is displayed to the output window. May not be available on all HPC units.

12. STEP: This is a new option on the Run command in the Tools menu. As the program runs, the line number and code for each statement is displayed to the break window. Execution halts after each statement. May not be available on all HPC units.

13. ActiveX Controls: Microsoft have issued an update to their ActiveX controls. These fix many bugs. New controls are now included: ImageList, Image, tabStrip, listView and TreeView. We left these out before because they were just too buggy.

14. BASIC Samples: The samples have been updated to work on Palm-size screen. Other improvements were also made to a number of them, and the Tech Notes have been updated.

15. Execute Function: This is a new option on the Run command in the Tools menu. It is usable after you have started a program, then run to the Edit enviroment while the program is ts still running. It will put up a list of subroutines and functions in the program, and allow you to choose one to run. This feature is good for debugging subroutines directly.

16. New shortcuts for ActiveX Controls: Rather than using the long names for objects, it's now possible to use the following short forms in the ADDOBJECT statement: image, imagelist, listview, tabstrip, treeview, grid.

17. Visual Designer

The Visual Designer is the fastest way to design forms of any complexity. From the Tools menu, select Visual Designer. Add the objects you want, design your menu, and exit to return to the NS Basic/CE editor. Your design will be translated into code appended to the end of your program. To make further changes to your layout, call the Visual Designer again. If you modify the generated code, you will not be able to edit it using Visual Designer.

Note that the names you choose for your objects need to be unique: you cannot have the same name on two different forms.

Minor changes and Bug Fixes

2.1

1. Date and Time Objects: Do not support ForeColor and Backcolor. (Documentation change).

2. Visual Designer now has a keyboard shortcut: Ctrl-D.

3. Visual Designer: When NEW program is started, Visual Designer workfile is deleted.

4. Encryption settings work more consistantly.

5. Error messages now show up properly on all devices (Script.exe)

6. Help on HPC units had incorrect pointers in Contents

7. Output: Width is 1 pixel wider, to equal actual width of screen.

8. Output_Keypress: Only has one parameter, not two as in the Handbook.

9. Replace no longer hangs when given repetitive arguments.

10. Samples updated to note when additional control needs to be loaded for them to work.

11. Show Variable menu item is now grayed out if program not running.

12. STEP and TRACE now handle statements with continuation characters ("_").

13. TRACE now works with OPTION EXPLICIT set.

14. TRACE now works with SELECT statements.

15. Visual Designer: now called properly on non-English language units.

16. Script Installer: Smaller and quicker VBScript.dll now installed on HPC/Pro units with MIPS processors.

17. Visual Designer: checks that object names are unique.

18. Visual Designer: positions property box on top of palm size screen.

19. Visual Designer: puts dotted line between objects in generated code.

20. Visual Designer: Changing a property and pressing enter used to lose some changes.

21. Visual Designer: Menu editors now come to foreground properly.

22. Visual Designer: Problems with Menu items with menu key and submenus fixed.

23. Visual Designer: UPDATESCREEN done after menu is generated in ShowMenu.

24. Visual Designer: Pickers added for Fontsize, fontname, scrollbars.

25. Installation process simplified: now there are just 3.

26. Installation: no longer required to install into default directory.

Changes in 2.01

1. Visual Designer: dragging objects works properly with touchpad units.

2. Visual Designer: objects now appear at runtime with same sizing as in Designer.

3. Editor: No need to restart NS Basic after an error in the runtime.

4. HP 680: Special version of Script installer to fix bad VBScript in ROM.

5. Support added for SH4 processors (Compaq Aero 8000)

6. Separate installers provided for MIPS 39xx processors.

7. Palm-size installer modified to work on systems without EzExplorer.

8. Install Map provided on web site.

Changes in 2.0

1. Installation simplified for non-US units.

2. CHAIN to a non-existant program no longer leaves the wait cursor running.

3. Objects now default to having no contents, instead of a default value. Note: if you have a CommandButton, you now have to set the Caption property yourself! (This solves the problem of the default value showing then changing)

4. SETFOCUS: now sends a GOTFOCUS event from the new object.

5. Auto Format of "IF X>10 THEN EXIT DO" fixed.

6. ADDOBJECT: If object not found, error message now shows name of object.

7. The Jornada 820 installer is now part of the regular installation.

8. The runtime environment has been made more stable.

9. The Run icon has been changed to a right arrow.

10. The ComboBox object has had a number of bugs corrected.

Known Problems

1. DATE and TIME objects: May produce unpredictable results and hangs on SH3 devices. The objects work fine on MIPS and ARM.

Known Problems that are Microsoft's

1. INPUTBOX does not size properly on Palm-size PC screen. This command is built into Microsoft's software. They shipped it without fixing the problem - but say it will hopefully be fixed in the next release.

2. Registration of ActiveX objects using Microsoft's official installer does not work on Palm-size PC units. Once again, this is Microsoft's bug. Luckily, we can workaround this using the new ShellExecute command - see the example above for how to register ActiveX controls easily. (The Microsoft Visual BASIC for CE folks aren't so lucky!)

3. CommonDialog ActiveX Control on PPC bugs: the showColor method is not supported and the showFont method not resized for Palm-size screen. Microsoft admits this is a result of working to get their product out quickly.

4. On HP 680 units, 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.

5. On Palm-size units, concatenating a string to a boolean causes an error.

6. The EVAL statement doen't work on some devices. This appears to be a problem in Microsoft's compiler. Workaround: use Execute instead.

7. 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 200 pages and details all commands, functions and statement, with example for each of them.

2. The On line help 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, posted on our web site.

4. Sample Code: We have a selection of programs submitted by NS Basic/CE users - some cool stuff here!

 


Support

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

1. The NS Basic/CE BBS. Post questions and comments, and get answers in a public forum.

2. Email Support: Send your questions to support@nsbasic.com

3. Fax Support: Send faxes to 416 264-5888.

4. Tech Notes: The Tech Notes posted on our web site give additional and specialized information on a wide variety of topics.

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

6. Microsoft On Line Help: Since NSBCE uses the Windows CE VBScript Engine, your issue might be something that Microsoft has addressed in its Support Online section. If you enter "VBCE" as your question, you'll see a complete list of VBScript for CE issues.

 


© NSB Corporation. All rights reserved.