|
 |
 |
 |
Source Code for eMbedded Visual Basic
If you want source code to build enterprise Pocket PC applications with eMbedded Visual Basic, this
is the place to look. We have gathered all the source code included in our book
here to help you get started with your Pocket PC application development.
Or you may be looking for source code for .NET Compact Framework.
This code is currently available:
Pocket Service
Framing a Wizard
MenuBar
ListView
S309PictureBox
DateTimePicker
ProgressBar
Full screen form
POOM
Shell
Hardware keys
Scrollable forms
Help
SOAP
All the sample code from the book
 |
Pocket Service
This is the main sample in the book, and it shows how field service technicians could do their job
from anyplace with a Pocket PC. The sample is discussed extensively in the book and the source code
include both the client and server part of the application.
Please feel welcome to download the sample code.
|
 |
 Pocket Service Sample |
 |
Framing a Wizard
This sample code illustrates how to use Frames to build a wizard in a Pocket PC application.
The wizard sample will assist the user, a field technician, to collect the customer's
signature and level of satisfaction. The sample will finish by displaying all collected
data on a separate form.
Please feel welcome to download the sample code.
|
 |
 Wizard Sample |
 |
MenuBar Sample
This sample code show you how to use the most common control in the Pocket PC developer
toolbox — the menubar control. You will most likely include the MenuBar control in all your
projects and it obviously enables you to implement menus into your applications.
Unfortunately there is no visual interface (Properties dialog) for working with menus,
so the only way to do this, is to create the menu in code.
The control is quite capable with options to create cascading menus, checked menu options, and
so on. You can even use it to create command buttons in the menu area as this sample will show
you.
Please feel welcome to download the sample code.
|
 |
 MenuBar Sample |
 |
ListView Sample
As an enterprise developer, the ListView may be the most important user interface control to master.
If you can make your lists appear in an efficient way, your users will be more efficient.
The ListView control is very capable and here we will only cover the most important parts for
enterprise application development.
With some special tricks, we can enable full row select and checkboxes as this sample demonstrates.
Please feel welcome to download the sample code.
|
 |
 ListView Sample |
 |
S309PictureBox Sample
As the eVB PictureBox has a number of limitations, it's great to see that there are third-party
alternatives like the S309PictureBox.
This control can display bitmaps (bmp and 2bp), GIF, JPEG, and XBM image files. It can even display
bitmap resources from resource files, including common bitmaps such as FileOpen and FileClose. It can
capture and display an image of the physical screen as well as save an image as a bitmap file. With it,
you can also clip, invert colors, mirror, resize, and rotate an image as this sample will show you.
Check out the documentation for more features. And best of all - it's free!
Please feel welcome to download the sample code.
|
 |
 S309PictureBox Sample |
 |
DateTimePicker Sample
As you probably have noticed, there is no DateTimePicker control included with eVB. And as we mentioned
before it's very desirable to minimize what the user has to enter through the SIP. We want to convert
SIP entries to stylus taps and when it comes to dates, it can really be a hassle to enter dates by
using the SIP. As with some of the other things that you want to do that are not included in eVB, you
have to use Windows CE API calls with all its obstacles (lack of UDTs, and so forth).
In this sample you will see you can create a DateTimePicker control using a module (.bas) with all the
functionality needed.
Please feel welcome to download the sample code.
|
 |
 DateTimePicker Sample |
 |
ProgressBar Sample
Another control not available in eVB is a progress bar. A progress bar not only shows your users that
something is happening, it also shows how fast something is happening. That helps your users to predict
when to expect the operation to be finished. Somehow, it will even keep them occupied just following
the progress bar, as it seems to have a calming effect on many people.
In this sample you will see you can create a ProgressBar control using a module (.bas) with all the
functionality needed.
Please feel welcome to download the sample code.
|
 |
 ProgressBar Sample |
 |
Full screen form Sample
The screen size dominates application navigation and user interface design on the Pocket PC, and any
mobile device for that matter. You can gain valuable screen real estate by utilizing the entire
screen by removing the menu and task bar and thereby gaining access to all the 240 x 320 pixels.
These extra pixels may prove to be valuable in many scenarios including displaying maps, blueprints
and other graphics, as well as when creating games.
The following sample code illustrates how to use the Pocket PC resource files coredll.dll and
aygshell.dll to get a Form to go full screen.
Please feel welcome to download the sample code.
|
 |
 FullScreen Sample |
 |
POOM Sample
From an enterprise application perspective it is not likely that you will want to replace the Pocket
Outlook applications on your users' Pocket PCs with your own version of these applications. But
because your users will likely use the Pocket Outlook applications and store vital data using them,
you can leverage and make use of the Pocket Outlook data using the POOM SDK.
This sample illustrates how to use the POOM to reach the Calendar, Tasks, and Contact information
stored on the Pocket PC.
Please feel welcome to download the sample code.
|
 |
 POOM Sample |
 |
Shell Sample
It's not possibile to launch an application in eVB as you did with the Shell command in VB 6.0. There
is no such command in eVB and if you want to use the Windows CE API CreateProcess, you have the problem
with eVB's lack of UDTs.
This sample shows how you can emulate a Shell command with a standard module (.bas) including the
necessary declarations.
Please feel welcome to download the sample code.
|
 |
 Shell Sample |
 |
Hardware keys Sample
There are situations when you may like to use the application launch buttons (also referred to as
hardware buttons) on your device to ease navigation in your application. It could be a great addition
to a tabbed screen where you switch tabs with the keys as well as the stylus.
This sample shows how you can capture the hardware key.
Please feel welcome to download the sample code.
|
 |
 Hardware keys Sample |
 |
Scrollable forms Sample
If you want to get more information into a form, you might want to make your forms scrollable. This
is not natively supported in eVB, so we will have to do our own implementation of this. With a Frame
control and a VScrollBar control you can emulate a scrollable form as this sample shows.
Please feel welcome to download the sample code.
|
 |
 Scrollable forms Sample |
 |
Help Sample
The normal way to access Help on a Pocket PC, is by selecting Help at the Start menu. Depending
upon where you are, different things will happen. The rule as always is to look at other applications
(preferably the applications from Microsoft like Pocket Word and Pocket Excel) to know how to handle
user interface issues.
This sample will show you various options for responding to help requests.
Please feel welcome to download the sample code.
|
 |
 Help Sample |
 |
SOAP Sample
There is an obvious need to access server components in an enterprise Pocket PC application, and the
standard way of doing so is by using Web Services (SOAP).
This sample will show you how to call Web Services (using SOAP) with eVB both using custom code as well
as the third-party component PocketSOAP. The sample also shows how to transfer data (recordsets as XML) using SOAP.
Please feel welcome to download the sample code.
|
 |
 SOAP Sample |
|