SAMPLES

How to use samples.
Unzip the downloaded files into your VBs' Programs directory. Run one of them and check how it
works.Run VBtraNS and convert the project into NSB language.While you are looking at the code
click Create File and type your CE Device's synchronized folder's path. If you are working with the
ActiveSync program active you can immediately see the result of the conversion on the device's
screen. If all is OK program must run on the PPC in the same way it runs on Desk PC.

NEW  the first real program developed using the help of VBtraNS RENALL.nsb

             

                  VB 5.0                                              Converted for    PPC 2002

This is the first program for PPC created using the converter.
The program is a simple rename tool that can change the name and the extention
also of any file in your device. The program use a coded Dir and File boxes to 
allow the user to operate on any file. (Remember anyway that renaming a file's
extention you can hang your PDA if you do not know well what you are doing)
The translation produced about the 95% of the converted code to use, but owing
the Beta version of VBtraNS i had to modify or add few line of code manually.
In the zipped file you will find the final NSB program as well the VB code to try
the converter, if you like.
The following are the changes manually added to the converted code.
Objects
ALL LABELS: Added a line as Label... .Caption = OutPut.Backcolor
CHECKBOX : Added the line Check1.Caption = OutPut.Backcolor
DirLISTBOX   : Add line DListBox.AddItem "\"
LABEL7      : Mofify line  Label7.FontSize = 7 instead of 8.25
TEXT1.TEXT: Add line Text1.BorderStyle = 1
You may need to adjust the Position and dimensions coordinates by few pixels
to optimize the program's window design.
(The new coming version will include a Form Template to avoid the above.) 
Code
In the line starting with FileSystem.Move delete the instruction :FileSystem.Kill.....
erroneously added by the converter that does not recognize if the instruction
Name means simply Rename or Move and Rename. (This wil be fixed later)

NOTE: with the version 1.2 the Dir and File List Boxes' code has  been used to
          authomatically emulate, in the converter, the use of DirListBox and
          FileListBox usually used under VB code. (This objects are not available
          in the NSBasic Language). May be useful to update your download
          simply overwriting the old file by the new one. 

You can download the VB 5.0 code to convert by VBtraNS  as well the result
of the conversion, as fully working NSBasic program     HERE 
 FileProva1.zip      DOWNLOAD 


This program allows you to test handling of files conversion and at the same time to see several
objects (as List, Grid, CheckBox, Graphical objects, CommandButtons and menu) translation works.
USE: Check each box and you will see some names added to the list.Click on Save will create a file
named Casa.txt in the device \temp dir. Click Rename and this file will be renamed Famiglia.txt. 
This will enable the Cancel button. Click it to cancel the renamed file. 
Please note that VB program will create Casa.Txt in the folder C:\Windows\Temp. As there is an
equivalent path '\Temp' on the device the same will be translated authomatically.
The rename path is instead C:\Windows\Franco that surely does not have any equivalent on your
device so you will be prompted by an input box to type the equivalent path that you like (type in
this case '\Temp' again to make matter work).
This has been done to show how the authomatic renaming work even if you will get an error if
you try to use Rename button on Vb version on Desk computer.
 DialogTest.zip            DOWNLOAD

This sample shows how the CommonDialog object may be converted in NSBasic language.
USE: Each button will activate a single CommonDialog windows (Open,Save As etc) the third
button will show the NSB help if it is loaded on your device otherwise, after an error advice
will show the WinCE help. In the Textbox below will be shown the related command. 
 RADAR.zip            DOWNLOAD         
This program quickly convert an image designed in VB using Shape
and Line objects in the equivalent NSB code using Drawline and
DrawCircle properties of the Output object. The design is not
perfect owing to the different way to draw of the two languages
but you can easily correct it adding few pixel to the coordinates
 FileLines.zip             DOWNLOAD 

Another type of drawing's sample that show various types of Lines and include also an
Objects' array sample using OptionButtons with customized positions.
   DoubleArray.zip     DOWNLOAD 

This sample simply shows the conversion of two objects' arrays the first in the Form and
the second into a Frame. Note that handling code for the arrays is missing so, if you try
to use them you will get an error. There is also a filled shape that, missing for the moment
a coverter color conversion table will be shown filled in Black instead of Red after translation.