Migration assistant source code

Hi,
Is the VB migration assistant source code available? I downloaded the product but it doesn’t include the source. I am considering converting a large package written in another dialect of Basic and having the source code of the VB migration assistant would probably give me a good head start.

No, the source for VB Migration Assistant is not available.

Thanks. Bummer though, it would make things a lot easier. We may well take XOJO out of the running for the project due to the lack of conversion tools.

To be honest the migration tool only could do a limited amount for you.
If you read Bob Keeney’s blog (he’s done a lot of conversions of VB projects to Xojo) I think you’ll find that in general its the best opportunity to revamp the application you’ll ever get.
Converting “common idioms” in one language to another may not result in a well performing or well behaving application.

Well, it was never a conversion tool. It never converted any code, for example. It primarily just moved everything out of a VB project and into a Xojo project so you could more easily refer to it. You’d still have to do all the real work yourself.

I agree with Norman. Attempting to convert directly from one language to another rarely works out well. You end up with code in the new language that is written using design techniques from the old language. It’s almost always a worst of both worlds situation.

[quote=52628:@Norman Palardy]To be honest the migration tool only could do a limited amount for you.
If you read Bob Keeney’s blog (he’s done a lot of conversions of VB projects to Xojo) I think you’ll find that in general its the best opportunity to revamp the application you’ll ever get.
Converting “common idioms” in one language to another may not result in a well performing or well behaving application.[/quote]

http://www.bkeeneybriefs.com

From experience, you’ll be very disappointed with any of the converters out there. There are just too many differences between VB6 and Xojo to make any language conversion worthwhile. Any decent VB6 app will have a ton of declares to work around all of VB6’s deficiencies that you will rarely, if ever, need in a Xojo application (and what you need will be different anyway).

The Migration Assistant converts as much of the UI as it can. It works okay and, frankly, to me, that’s what you want the converter to do because it can mostly get it right. With the exception of pure VB code (no GUI, OS classes, etc) you are better of rewriting it in Xojo anyway. File handling, control subclassing, database handling and a bunch of other things are so completely different that there really is no possible conversion routines.

Even after all that, I’ve converted a bunch of VB6 apps that didn’t declare variables properly. Used 1 based arrays and did all sorts of nonsense that Xojo won’t let you do. So you’re better off rewriting anyway.

We, BKeeney Software, can help with rewriting your project in Xojo. More information at https://www.bkeeney.com/vb2rbconversion/

Which dialect ?

Thanks for the input guys - I appreciate it. We have about 5000 programs written in “Business Basic”, specifically pxPlus (aka ProvideX). There is enough similar syntax to make me want to at least explore writing a conversion program. It may well be that it is not possible. The original author of the migration assistant (Matthew) has offered to open up his source code for me so I can see what, if anything, I can do to make this happen.

John

I have successfully written a program to convert my screens to Xojo. The only thing I have not figured out is how to get an icon onto a beveled button in the Xojo xml project file format. The icon is being successfully added to the project, but it isn’t making it to my button. If anyone knows what I am doing wrong and tell me how to correct this for my conversion program, I would be most grateful.

This block adds the icon to my project:

SaveProfilesmall
0
C:\Program Files (x86)\Xojo\Xojo 2013r3.3\Resources\SaveProfile-small.png
SaveProfile-small.png
SaveProfilesmall

Here is a bevel button I have added. The “icon” property should add the icon to the button, but when I run Xojo and look at the button in the IDE the icon field is None.

BevelButton
BevelButton

False
False
False
0
0.0
System
0
True

True
True
False
False
&Accept
3
2
10
SaveProfilesmall
10
True

3135

False
False
True
True

303337


303936


353537


323634

0
BevelButton

2D32313437343833363438

BTN_OK
53
0

An icon has both a name & ID

Here’s the XML from a project saved from the IDE for an icon (its a JPEG of Tigger)

tigger

And when you put it on a control the ID is used - not the name

Here’e the XML from a control with this set as the icon
508820598

In fact EVERY item in a project has an ID - and it better be unique or you’ll have problems

Thank you Norman. I changed my icon reference to the unique ID and that works perfectly. And thanks for the heads up about the use of ID numbers for every item.

Dunno if its of any use at this point but I do have a bunch of classes that make writing code to write code easier.
See http://www.great-white-software.com/REALbasic_Code.html
About the 4th line down is a the RB Code Generation classes.
I’m about ready to post an update sometime later this week that supports nesting classes & modules in other modules (something that was not possible when I originally wrote those so long ago)