|
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!
Contents
- Overview
- Installation
- How to run a sample program
- Requirements
- What's New
8.0.0
8.0.1
8.0.2
8.1.0
8.1.1
8.1.2
8.2.0
- Notes and Warnings
- Documentation
- 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:
- Gradient Buttons
- Creation of installers
- Vastly simplified installation and distribution of apps
- No separate runtime required
- Embedded resources
- HTML control
- 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:
- The Demo will only run for 30 days.
- You can develop on the desktop, not the device.
- Apps you create will run on a device for 5 days.
- 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
- Easy to use, standard and structured BASIC
- Over a dozen screen objects
- Create buttons, fields, popups and more
- Serial, IR and internet communications
- Math and trigonometric function support
- Automatic creation of device installers
- Royalty free
- Built in database support
- Supports virtually all touchcreen devices built since 2003
- Program and run on either the desktop or the device itself
- Lots of sample code
- 200 page Handbook
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
- 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.
- 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
- Start NS Basic/CE 8.2
- From the File Menu, select Open Sample Project...
- Choose HelloWorldStandard.
- Make sure you have a device connected via ActiveSync.
- Click Start in the Run Menu and follow the prompts.
- 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)
- Start Basic and choose Benchmark from the list that appears.
- Tap on the green GO button.
- 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.
- 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:
- Windows 7
- Windows Vista
- Windows XP
- Windows 2000
- Any Windows Mobile or Windows CE device listed below
- Macintosh using Virtual PC, VMWare or Parallels
- Linux using Win4Lin or VmWare
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.
- Windows Phone 6.5 Professional and Classic devices
- Windows Embedded Mobile 6.0 devices
- Windows Mobile 6.0 and 6.1 Professional and Classic devices.
- Windows Mobile 5.0 devices (including Phone Edition)
- Windows CE.NET 4.2 ARM XScale Processors
- Windows Mobile 2003 Second Edition
- Windows Mobile 2003 Phone Edition
- Windows Mobile 2003
5. What's New
8.2.0
- IDE: Command line compile option added. See docs below.
- IDE: PNG Icon will also be looked for in the .ico file folder.
- IDE: Setting Optionbutton Alignment to 2 (center) no longer gets an error.
- IDE: Preserve is highlited as a keyword.
- IDE: Label object now has visible property
- IDE: New version of exProperties control (5.2.0.2)
- Installer: Bug in link to program fixed when installDir<>program name.
- Installer: DirToInclude can now be a list of directories, so more than one can be installed.
- Installer: If installDir is not specified, Shortcut is now created properly.
- Installer: Installer file is now named with the app's Title property.
Documentation Changes for Version 8.2.0
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
8.1.2
- IDE: If you open another project, files in old project are now closed.
- IDE: Occasional crash on exit fixed.
- Installer: Extra entry in Start Menu not created when project title is blank.
- Installer: Recent file list is no longer overwritten.
- PictureBox: now sizes fonts properly in Hi Res mode.
- Runtime: New Constant: AppBuildStamp contains the build date and time.
- Runtime: New Function: SysInfo returns useful device information.
- Runtime: WinCE devices without PIE installed fixed.
- Tech Note 30: fixed image.
8.1.1
- Support added for Windows Mobile 6.5 Start Screen png icons.
- Tech Note 30 updated with information on WM 6.5 icons.
- Installer: Start Screen update no longer requires a reset in most cases.
- IDE: Error 91 when doing View Code fixed.
- IDE: Problems with application icon fixed.
8.1.0
- New Control: HTMLView. See Tech Note 42.
- IDE: Project now has Hi Res Aware property - see below.
- IDE: Project now has Dir To Install property - see below.
- IDE: Code Window: Now shows 16 lines in dropdown instead of 8.
- IDE: Extra blank lines are not longer added on each save.
- IDE: Form did not save Picture property.
- IDE: Loop is now highlighted as a keyword.
- IDE: Error 6 when selecting system color for gradient button fixed.
- IDE: Pocket PC VGA added to Option > Design Screen sizes.
- IDE: Bug when opening NS Basic/Desktop projects fixed.
- IDE: Better messages when object names are rejected in Properties.
- IDE: Error when pasting PictureBoxes and Gradient Buttons fixed.
- eVB2nsb: a number of enhancements have been made.
- Installer does not overwrite newer Basic.exe.
- Installer was deleting all files ending in .DAT
- New Function: SendMessageString - see below.
- PictureBox: DrawText was not sized properly on some devices (NSBCEPicturebox.ocx 1.3.2)
- Runtime: Fat executable now produced - see below.
- Runtime: Illegal character when loading program fixed.
- Runtime and IDE: Icon cleaned up.
- New Tech Note: 42 Using the HTMLview control
- New Sample: HTMLview
Documentation Changes for Version 8.1.0
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.
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.
SendMessageString(): This function works just like SendMessage(), but allows a string as the last argument.
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.
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.
8.0.2
- Compiler: Projects with installer resources are smaller.
- IDE runs as Administrator so installer can be made.
- IDE: Bold on GradientButtons fixed.
- IDE: Changing platforms no longer requires resetting resource paths.
- IDE: CheckBox.Alignment can no longer be set to Center.
- IDE: Opening a sample project closes project already open.
- IDE: Paste Gradient Button fixed.
- IDE: Paths to resources in \Controls\ are no longer relative.
- New Sample: TeklogixScan for Teklogix devices.
- PictureBox 1.3.1 included
- PictureBox: Gradient Buttons now appear on older Window Mobile devices.
- PictureBox: Gradient Buttons now appear on Windows CE devices.
8.0.1
- Platform set properly in demo.
- Projects saved to root directory of a drive load OK now.
- Special characters are not allowed in pathname when creating installer.
- EULA and ReadMe in app directory no longer overwritten.
- F6 key now does Install App To Device.
8.0.0
- Embed pictures, sound and files as resources.
- Gradient Buttons give a slick look and feel to Apps.
- Automatic creation of device installers.
- Smaller executables - programs are up to 1/3 smaller than before.
- Smaller download - The complete NS Basic/CE is now just 15 megs.
- IDE: Alignment can now be set to center on some additional objects.
- IDE: More properties now have pickers.
- IDE: Now uses XP theme.
- IDE: Resources can be added to Project Explorer. (see below)
- IDE: Loaded apps go on recent files list, not just saved ones.
- IDE: New options to start program. (see below)
- IDE: New programs have "ShowOkButton True".
- IDE: New project properties for creating installers.
- Device IDE: Serial number automatically set on installation.
- Options: Square and landscape screen sizes added.
- Options: Device directory removed - now automatic.
- Options: New Installer screen (see below)
- NSCEPictureBox: ResourceBitmapIDstr added. (see below)
- NSCEPictureBox: Upgraded to Version 1.3.
- Runtime: New function: CreateShortcut. See below.
- Runtime: New function: GetResource. See below.
- Runtime: PlaySound can now play sounds that are saved as resources.
- Runtime: PictureBox can now display bitmaps that are saved as resources.
- Runtime: Error when exiting app on 6.1.4 devices fixed.
- Sample added: GradientButton
- Sample added: Resources
- Sample added: NetStreams (replacement for Microsoft's old Winsock)
- Samples: reorganized and cleaned up.
- Samples added to File menu.
- Help: Tutorials added to Help menu.
- Tech Note added: 41 Using Adobe Flash with NS Basic.
- Tech Notes 30 on installers completely redone.
- Tech Notes: some missing ones added.
- Installers: Support for devices before Windows CE 4.2 dropped.
- Installers: SQLite3 is now included.
- Installers: More modern look and feel, multiple language support.
- Installers: On recent devices, uninstalling one app will not affect others.
- Installation: Reduced from over 60 megs to 15.
- Installation: NS Basic/CE desktop installer now uses Inno Setup.
- Installation: Device controls are in \Program Files\nsbasic\CE\Controls
- Installation: Samples are in \My Documents\NSBasic Samples\CE
- Installation: The registry entry for .nsb has been corrected.
Documentation Changes for Version 8.0.0
- 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.
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.
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.
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...
- 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.
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.
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.
Example:
'This will create a link in the Programs folder to your program.
err = CreateShortcut("\Windows\Start Menu\Programs\My Test.exe", """" & currentPath & """")
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.
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.
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
- 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.
- Use ActiveSync 4.5.0 or later.
- 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.
- 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
- 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")
- The EVAL statement doen't work on some devices. This appears to be a problem in Microsoft's compiler. Use the Execute statement instead.
- 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
- 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.
- The Language Reference under the Help menu contains a summary of all statements, functions, objects and constants.
- 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.
- 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.
- The Big Red Toolbox: A collection of controls and utilities submitted by NS Basic/CE users. Available on the Website, or on the CD.
- 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:
- The NS Basic/CE Web Board. Post questions and comments, and get answers in a public forum. The best and fastest way!
- Email Support: Send your questions to support@nsbasic.com
- Tech Notes: The Tech Notes posted on our web site give additional and specialized information on a wide variety of topics.
- 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!
- 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