Creating Applications for Handheld Devices Using eMbedded Visual Basic

A Simple Application

The eVB environment will be familiar to any developer with experience in Visual Basic 5 or 6.  The form designer looks and works the same; however, the components and references available are slightly limited in comparison.

In order to run eVB, select Start -> Programs -> Microsoft eMbedded Visual Tools-> eMbedded Visual Basic 3.0.

Upon opening eVB, the user will be greeted with the “New Project” screen:

This documentation assumes that the device being used is a Dell Axim X5 or equivalent, running PPC 2003.  Select the “Windows CE for the PPC Project” option, the screen that greets the user, shown below, is recognisable to any VB developer:

The first step is to rename the project, select “Project” from the drop-down menu and select “Project1 Properties”:

It is important to give any project a meaningful name so highlight the Project Name box on the Project Properties screen and enter a name such as FirstApp (note, no spaces allowed). Save this project in the usual way; File -> Save Project As, being careful to give both the project and the form meaningful names.

It is good practice to automatically change the Form’s “ScaleMode” property to “Pixel” instead of the default “Twip”, to do this, go to the Properties window and change the ScaleMode as shown below:


Now that the project has been created we can add controls to the form, in this simple “Hello World” application we shall begin by adding a “Label”.  This is done by clicking on the Label Control  and dragging a label onto the form to the desired size:

With the new label highlighted, the properties window on the right hand side of the screen can be modified in order to tell our label how to behave.  To change the message displayed by the label highlight the box next to the word “Caption” and change the content to “Hello World!”:

Other properties which may be changed include the “Font” property.  This is achieved by clicking on the box with the small dots next to the Font Label (as shown below).  The subsequent pop-up menu will be familiar to all Windows users and can be configured as required.

In order to run this application and see the results on your handheld device select  File -> Make Project1.vb…, the standard Windows dialog box will appear and the user may save their application in the chosen folder.  Due to the incompatibilities described previously, it is not possible to run our application using the emulator.  It is necessary therefore to open windows Explorer and navigate to the Mobile Device folder, ensuring your PDA is in its cradle.

Drag and drop the Project1.vb application from its current location onto this Explorer Window, the application is now ready to use.  To view this first application select Start -> Programs -> File Explorer on your hand-held device, navigate to the My Documents folder and click the Project1 icon.

Once the basics have been mastered, other controls may be added and manipulated, for instance, Command Buttons and Text Boxes may be used to create a simple means of data entry/manipulation.

You might also like...



Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne