| NS Basic/CE Enhancements February 04, 2008 Copyright 2008 NS BASIC Corporation |
7.0.5
7.0.4
7.0.3
7.0.2
7.0.1
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
MsgBox SpecialFolder(0h0006) 'displays \My Documents on English Pocket PC
ID values are:
6.5.3
MsgBox SpecialFolder(0h0006) 'displays \My Documents on English Pocket PC
ID values are:
6.5.2
6.5.1
6.5.0
To add a module to a project, choose either Add Module from the Project menu or right click on the project in the Project Explorer. Modules are added to your program in the order they appear in the Project Explorer. If you want to change the order in which they are compiled, right click on the project in the Project Explorer.
Internally, the modules are added to the project code in the order specificed before compilation. You can put DIM statements, subroutines, functions and code into a module. If you would like to see the actual code that will be compiled, save the project as a txt file and open it in NotePad.
Running a program with modules is the same as one without. If you choose Start under the Run menu, a .nsb file will be produced that combines your main project code with all your modules.
You can also choose Make under the File menu. In this case, a .exe file will be produced that will run on Pocket PC devices. It will be named the same way as the .nsb file is.
The Output object in has a new read-only propery: ParentHwnd. This returns the parent window of the Output window. It is useful for many system routines that require a window. The following example displays a popup menu on NSBasic CE, using the Output.ParentHwnd property.
AddObject "CommandButton", "cb1", 10, 10, 100, 20
cb1.caption = "Menu"
Declare "Function CreatePopupMenu Lib ""Coredll"" () As Long"
Declare "Function AppendMenu Lib ""Coredll"" Alias "AppendMenuW"" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As String) As Long"
Declare "Function TrackPopupMenuEx Lib ""Coredll"" (ByBal hMenu As Long, ByVal un As Lont, ByVal n1 As Long, ByVal n2 As Long, ByVal hWnd As Long,lpTPMParams As Long) As Long"
Const TPM_RETURNCMD = $H100&
Const MF_ENABLED = &H0&
Const MF_STRING = &H0&
Const MF_GRAYED = &H1&
Const MF_SEPARATOR = &H800&
Sub cb1_Click
Dim ret
Dim hMenu
hMenu = CreatePopupMenu
AppendMenu hMenu, MF_ENABLED Or MF_STRING, 1, "Option 1"
AppendMenu hMenu, MF_ENABLED Or MF_STRING, 2, "Option 2"
AppendMenu hMenu, MF_ENABLED Or MF_STRING, 3, "Option 3"
AppendMenu hMenu, MF_GRAYED Or MF_SEPARATOR, 4, ""
AppendMenu hMenu, MF_ENABLED Or MF_STRING, 5, "Fuhgettaboutit"
ret = ShowPopupMenu(0, 0)
MsgBox ret
End Sub
You must use the ParentHWnd property because under Windows Mobile 5,
attempting to display a popup menu using Output.Hwnd causes undesirable
results. This appears to be unique to Mobile 5 and does not occur on
earlier devices.
You can also present popup windows under NSBasic Desktop by using the Output.Hwnd property, provided that the appropriate core DLL is installed on the system.
If you are writing code that is to run under both NSBasic CE and NSBasic Desktop, you can take advantage of the fact that Output.ParentHwnd is always 0 under NSBasic Desktop.
6.1.0
6.0.4
Note that EXE files are only produced for ARM devices, primarily Pocket PC. This includes Windows Mobile 5 and Pocket PC 2003. EXE files will not run on devices that use SH3 or MIPS processors. If you make an EXE file using NS Basic/CE 6.0.4, make sure your runtime is also 6.0.4.
6.0.3
AppTitle = "My Program"
6.0.2
The icon must be a valid Windows .ico file. It should have 32x32 and 16x16 icons in it. The number of bits per pixel does not seem to matter.
6.0.1
6.0.0
5.1.2
5.1.1
5.1.0
5.0.3
5.0.2
Here is a list of all the changes to NS Basic/CE 5.0.2.5.0.1
Here is a list of all the changes to NS Basic/CE 5.0.1.5.0.0
Here is a list of all the changes to NS Basic/CE 5.0.0. All new statements are documented in the Help menu in the desktop IDE.sub frmMyForm_load msgbox "fromMyForm has just been loaded" end sub
To affect the appearance of the current form, do not use Output_ If ActiveSync is used and the device has an IP address because of a LAN card, you will need to set the connection type to WAN and enter the IP address of the device. This is because VCE tries to connect to 192.168.55.101 when using ActiveSync and this address is overridden if a network device is active on the machine.
Screen images can be captured using Virtual CE using the SnapShot button. A bitmap image is saved into the file
Virtual CE is a feature that makes it easier to debug your programs on the desktop. To use it, you need to have a device connected to your desktop system via ActiveSync. Select "Start Virtual CE" from the Run menu, and an image of your device will appear on the desktop. You can operate your programs directly on the desktop: everything you do will actually run on the device, updating the screen image.
\Program Files\NSBasic\CE\Tools\RECORDED_DATA
We tried hard to make the EmCE emulator work. However, the differences between Windows on the desktop and Windows CE are too deep and substantial to make EmCE ever be an accurate emulator. Many of the Microsoft controls that EmCE depended on are implemented differently on the desktop and the device. Rather than using EmCE, we've elected to support Virtual CE, which works much better.
You can now add Frame objects to projects. Objects that are added on top of a Frame become children of that frame: hiding and showing a frame will hide and show the child objects.
All Desktop IDE messages and text are contained in the file
\Program Files\Nsbasic\CE\Lang\strTable_English.txt.
This allows the IDE to be localized into other languages by translating this text file. Let us know if you do this: we would like to include it for others who use your language.
4.0.0
Completely new Desktop IDE.
We've done a complete rewrite of the Desktop develpment environment. Starting with the codebase used in NS Basic/Palm, we've made the new version much easier to maintain and improve.Em CE - the new NS Basic CE Emulator
This is a new tool to allow you to test your programs on the desktop before downloading to the device. It can't do everything a Windows CE device can, so be sure to read the Warning section of the Readme file for more info.Support for Pocket PC 2002 Phone Edition added.
New devices using this OS have starting shipping - NS Basic/CE 4.0 can create programs to run on these devices.Desktop IDE can now create programs that execute immediately on device.
Before, you could only save your program in .txt format. You had to load the program in the device IDE and save it before it could be run. Now, the Desktop IDE produces apps that are ready to run on a Windows CE device.Desktop can now load and save .nsb files.
The old desktop could only load .txt versions of programs. The new version lets you load .nsb apps that you have created on the device.The IDE can be localized by changing the \Lang\Str_Table.
All messages in the IDE are now kept in a Table. Under Tools...Options, you can select which string table you want to use. This can be used to create localized versions of the IDE for other languages. We will be adding Japanese and German string tables in the future.Third party tools in the \Tools will appear in the menu
Now, tools from third parties can be integrated into the NS Basic desktop environment. Simply put them into the Tools folder. The next time NS Basic is started, they will automatically appear in the Tools menu.Form_Load and Form_Unload are supported.
NS Basic/CE now suppports a Form_Load subroutine that will get called when a form is loaded. The syntax is Sub Form1_load()
'your code
End Sub
Place this code anywhere in your program and it will be executed just after the form is loaded. If you double click on the form in the CE Screen of the IDE, the load subroutine will appear.
Note that during when a form is loaded, the initial set of the value of a textbox will generate a textbox_change event. To ignore this event, put the following line of code at the beginning of the textbox_change code:
if form1(0)=false then exit sub
Once the form load processing is complete, form1(0) will have the value True.
Help greatly expanded.
We've compiled the reference section of the Handbook and put it under the Help menu. Now the full descriptions and samples for all statements, functions and commands are available right in the Desktop IDE.New shared library: NSBPhone adds telephone support.
We include a new shared library that lets you access of the unique telephony features the new Pocket PC Phone Edition devices.New serial number system implemented.
You'll need to use your new serial number to get both the desktop and device IDE working. We apologise for the inconvenience, but we had a problem with pirated numbers and people trying to hijack other user's serial numbers. Please keep your new number confidential.Problems with saving while Encrypted fixed.
On some devices, programs which were saved while encrypted could not be loaded again by the developer. This has been fixed so that only the original developer can load an encrypted program.4.0.1
Documentation Notes for 4.0.1
sub Output_close() bye end sub
4.0.2
Documentation Notes for 4.0.2
myButton.timer=100 sub myButton_timer() msgbox "myButton Timer event!" end sub
4.1.0
Support added for Mobile Windows 2003, also known as Pocket PC 2003. This has been done transparently: you do not have to make any changes to your code. The same NS Basic/CE program will run on Pocket PC 2003, Pocket PC 20002 and Pocket PC, as well as many other Windows CE devices.The new NS Basic 4.1 Runtime and Basic installers work on all these devices, installing the proper files, so your programs and NS Basic/CE will work.
4.2.0