Writing PocketPC apps with VB6 - its possible 
Author Message
 Writing PocketPC apps with VB6 - its possible

I don't know about you, but I have a ton of Add-ins that help me program
faster and better. Using the VBCE toolkit was great because I could use all
my Add-ins to write WindowsCE programs from within VB6. But now that MS came
out with embedded tools (eVB), it comes with a stand-alone IDE that
apparently doesn't support VB6 add-ins. So, now it looks like if I want to
write a program for the very cool new PocketPC's, I have to go back to the
stone age and program without all my nifty programming aids.

This is unacceptable! So, I set out to fix this problem.

I first tried to see if the PocketPC SDK is visible from VB6 and it is. When
you install the PocketPC PlatformSDK AFTER you install VBCE for VB6, the SDK
is available as a device when creating a new project. I have written a
PocketPC app and ran AND debugged it on an Casio E-115 Pocket PC. However, I
ran into one serious gotcha so far.

The VB object library (c:\vb6\vb6.olb) that VB6 uses by default does not
have these form properties (some are worded differently, I am lazy):
    FormResize - allows you to specify if the form size is fixed or adjusts
depending on is SIP is showing or not
    SIPAction - allows you to show/hide the keyboard
    ShowOK - Allows the circled "OK" to be displayed in the PocketPC system

The SIP action can be worked around by calling an API to show/hide the SIP.
The ShowOK can be worked around by having an "OK" button on the form.
But the "FormResize" is a problem. The property is read/write at design
time, but READ-ONLY at run time. If this property is not set to "2-usersize"
(luck has it set to 0 by default) then the form will always be displayed
full screen on a PocketPC. Since, the IDE doesn't know of this property,
their is no way to set it to "2" during design time, so you can never make
forms that are smaller then the full screen.

However, the VB library used by eVB uses the vb6ppc.olb that has these extra
form properties, however I am unable to get VB6 to use the vb6ppc.olb
instead of the vb6.olb because both libraries have the same title of "Visual
Basic Objects and Procedures" and I get a "duplicate definition" error if I
try to add a reference to the vb6ppc.olb. If I try to uncheck the reference
to the vb6.olb (so I can then add a reference to the vb6ppc.olb) it wont let
me saying its "in use" even if I delete all forms and modules in a blank
project. I even tried renaming vb6ppc.olb to vb6.olb, but the IDE still has
no clue what the property "FormResize" is (because it doesnt show up in the
forms' properties listbox. But in my code I could type "Form.F" and the
IntelliSense help will properly list "formresize" as a valid property. But
this does me no good because I can't use code to set this property, I need
to be able to set this property from the "properties" list box when the form
has the focus. I even tried adding the line "Formresize = 2" to the Main.frm
file, but when I try to load the form with this property, VB6 it strips it
out, but politely places FormResize is an invalid property" in the forms'
log file. I have no idea why when I am able to "load" the vb6pps.obl" by
renaming it, the IntelliSense can see the extra property, but the IDE
refuses to accept a form with that property. The only
thing I can think of is that either the IDE has hardwired the valid
properties of a form in it and can not be changed, or if the VB6.OLB file
was somehow registered, all of the valid form properties were loaded into
the registry, so even if I were able to load the vb6ppc.obl into memory, the
IDE only looks at whats in the registry as valid properties. If the later is
the case, does anyone know how to unregister the VB6.OLB and register

I also tried to delete the file "VB6.OLB" thinking that maybe VB6 will start
without loading either VB6.OLB or VB6PPC.OLB and then I could simply add the
VB6PPC.OLB as the one and only "Visual Basic Object and Procedures" library
and everyone would be happy, but VB6 refused to load - it seems VB6.OLB is
needed and is hardwired to be loaded each time VB6 is started.

The other approach is to make eVB accept add-ins, but this may be prove to
be very difficult if not impossible to do. I can only hope that since eVB is
based on VB6, it kinda goes to say that with maybe a hack here and a hack
there, the IDE of eVB might open up and accept VB6 Add-ins. I noticed that
there is a object library called "vb6ext.olb" that appears to allow access
to the eVB's IDE and project parts, just like VB6 does. So, I will probably
try this backup approach only if I cant get my first hack going.

I could use help here! So please contribute anything you can to this effort.
Or better yet, if someone at Microsoft sees this, please produce a new
VB6.OLB that includes the PocketPC specific properties for the form object,
or any solution/patch that would allow us to write apps for PocketPC and
use our add-ins, it would make a bunch of us PAYING VBCE TOOLKIT owners very

-John Cody

Wed, 04 Dec 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Vbscript manual on a PocketPC, is it possible ?

2. Install and update PocketPC apps from Internet Explorer

3. Will my eVB Apps run on PocketPC 2002?

4. H/PC App Not Running On PocketPC

5. Accessing a .CDB PocketPC database using VB6 with ADOCE

6. pasting from VB app to other apps???/possible???

7. Problem installing new vbnet app on a computer with vb6 app

8. installing VB6 apps breaks VB? - VB5 apps

9. 16-bit app calling VB6 32bit app - Slow

10. is it possible to write aggregate functions

11. Possible bug in DateTime when written to XML

12. Are direct screen writes possible in QBASIC


Powered by phpBB® Forum Software