PDA

Click to See Complete Forum and Search --> : Porting VB6 app to CE.Net system


Simon Caiger
Oct 28th, 2004, 08:09 AM
Hi,
I have an existing VB6 application and I want to, if possible, re-use some of the code on a cut down version of the user interface running on a WinCE.Net touch screen PC.

I would be grateful if somebody could give me some ideas as to the feasibility of this.

Specifically :

The new PC is running WinCE.Net, does that mean that the application has to be written in VB.Net or will CE.Net run applications written in good old VB6?

As you will probably guess from my question I am completely new to WinCE and have not yet used VB.Net. It would be good for the CV though :)

Thanks

Shaggy Hiker
Nov 24th, 2004, 12:42 PM
You will be able to port almost nothing. That's not company line, it's experience, and here's why:

The PDA is such a radically different device in terms of interface considerations that you will almost certainly benefit from re-designing the entire user interface from the ground up.

I am currently writing two programs that will have laptop and PDA versions. While the two versions will do the same things, they will look so different that I have not even bothered copying any code between the two, even though they are both in VB.NET.

As for running VB Classic: You can't. Prior to .NET CF, there was eVB for writing VB for PDA's, but it wasn't classic VB. Instead it was based on VBScript, which had many serious limitations. While similar to classic VB, the differences made it almost an entirely new animal.

.NET CF is a great improvement in most areas. There is adequate functionality for pretty much everything you want to do, and the only serious omission I have found is the inability to color buttons without subclassing off the Control object. Colored buttons are VERY convenient in a touch screen environment.

Since Classic VB converts to .NET only so-so, and the CF is a subset of .NET, and the interface design is so different on a PDA, all I can say is: Start over! You will make a better product that way, and you're pretty much going to start over anyways.

Simon Caiger
Nov 25th, 2004, 03:50 AM
Thanks for sharing your experience.
Will take your advice an start from scratch.

Shaggy Hiker
Nov 25th, 2004, 03:04 PM
A touch screen with such small size presents an interesting challenge, and a fun one. Here's a good tip for you:

Don't use more than one form if you can possibly help it.

Loading forms is slow in CE. There will be a noticeable pause when switching between forms, especially if the new form has to be loaded, a situation that you have limited control over.

In place of forms, use panels on a single form. Keep all the panels off to one side by setting the Top property to 300 or so. As each panel is required, move it into the visible area. This is very fast, much faster than loading forms, and it has the appearance to the user of normal forms.

However, there does appear to be a limit to this approach. Once I have about 15 panels on a form, there isn't room enough in the IDE to keep track of them. Therefore, for a program I am working on that requires more, I do have a second form, but the second form is an entirely separate logic path, so switching between the forms is not needed more than once in every program run.

I even go so far as to replicate panels onto each form if a menu item would take the user to that panel. That is generally really poor practice, but the speed improvement of panels over forms is such that it justifies the effort.

Simon Caiger
Nov 26th, 2004, 03:42 AM
Thanks for the tip :)

Goes against my usual WYSIWYG approach for developing VB applications.
Fortunately the functionality required for this cut down user interface is much less than I have for the full blown PC interface.