I used the VB MIgration app, and it did help a little, it preserved my global variable declarations, and commented out whatever code it could not convert. It isn’t perfect, but it did give me a bit of a headstart. The language is close enough to VB in enough ways where learning XOJO isn’t too hard really. There are some syntax differences, but Xojo is what I picture VB7 or VB8 would have been like, had it been made.
I do agree that a full conversion tool, at least for the basic controls and commands of VB6, would bring them many more developers from the now antiquated VB6 language.
Unfortunately, this just isn’t practical. Converting code between different languages is an incredibly difficult problem to solve. Microsoft’s own convert tool that is included with Visual Studio (or used to be, I have no idea if it is still included), never did a good job of it.
The end result of an automated code conversion (if it is even able to convert all your code) is that you have code that does not take advantage of any of the features or design techniques of the new language. Usually you just have a bunch of code that doesn’t work and needs to be rewritten anyway.
I have worked on many projects that moved from one language (VB6, FoxPro, Advanced Revelation, Access, SQLWindows, PowerBuilder) to another (Xojo, .NET, Java). In all cases, management thought it would be worth trying to “convert” the code “as is”. In all cases they were wrong and a rewrite proved to be the option that actually resulted in a working project.
Our VB Migration tool aims to make is easier for you to rewrite your code by having the original code available in your Xojo project for you to reference.
First of all thanks so much for some basic tutorials mr.Paul Lefebvre, I saw many and learn the basics with you on Xojo
NExt I agree with you, but as a real , “noob” and amateur with no education of coding, the migration will help the ppl like me to understand more have the codes are changing, I am sure it is not the solution, but very very good help to understand more for owneducated persons like me.
I believe it no longer exists - but I could be wrong - I’ve just not seen the original author around for a very long time
Bkeeney has a project analyzer tool that you might be interested in http://bkeeney.com/downloads/
But, as mentioned “porting” a vb program to Xojo really requires you know VB AND Xojo in order to know IF you have correctly ported it
We looked at making a converter tool years ago. The fact is that there is no good ‘translator’ out there. There are some things that are dirt simple in Xojo that take hundreds of lines of code to do in VB6. Anything to do with controls is a pain so, really, it’s easier to rewrite it in Xojo. The tools are good for converting what UI it can but it’s still a labor intensive process.
I’ve been doing VB conversions to Xojo for 12+ years now. There is no such thing as a good converter utility. I’ve found that you spend more time fixing the converted code than if you just learned Xojo and rewrote it. Too many people try to write Xojo apps like it was still VB6 and all they get is frustration. VB6 and Xojo are completely different languages that happen to use BASIC as the base language. Xojo is very object oriented. VB6 is not.
Or, you can hire someone like me to convert your VB6 project for you. You get it done the Xojo way, and you then have a nice base to learn from. I have dozens of clients that have done this.
Bob: I believe I submitted a project via your Analyzer tool a few days ago actually. Had yet to hear anything.
Yes, your point about things being easier in Xojo is so true.
Playing music/MP3 files for example, so simple in Xojo – put music file in project, intro.mp3 for example, then just enter: intro.Play and it just works. This is a royal pain in VB6 as it requires using quartz.dll, 12 lines in a module to set up (ActiveMovie, which of course requires DirectX to be installed), and then 5 lines of code to play 1 music file.
Well the other company is claiming they can create a convertor that would convert 95% of code.( they will start work on it later this year) Looking at what they have done so far( a basic/c++/java/pascal) all in one ide, they might pull it off. We will see, maybe they are just in fantasy land.
I am not impressed with oop cult thinking or design, its worked for me and comes natural to me. If i force myself in the pure oop way of thinking i am not productive… Just the way it is.
So far its worked for my 3 complex apps i sell worldwide.
Well I’d be curious since you cannot “convert” code on a line by line basis and end up with the same semantics
Something like this in VB
Open “svi.nan” For Input As #1
Input #1, svn, mn, tb
may turn into reading from a text file in Xojo or reading from a binary stream, or reading from a binary stream but reading in many types of variables. The original authors intent isn’t clear.
Syntactically VB & Xojo have many differences but semantically they have even more & you have to understand the developers intent in order to “do the right thing” - something an automated tool simply cannot do
its why as Bob pointed out a tool may be able to “convert” code but then it all has to be audited for correctness anyways and if you have to do that you might as well rewrite it
But I wish “them” and anyone who uses it much luck
I understand file IO has to be a little different since you’re supporting different platforms (which also attracted me to Xojo) such as Mac and Windows (and the few souls wishing to publish software to Linux).
It not just file IO
The list gets really long really quickly about how to do things
DoEvents (for instance) should be avoided in Xojo but was frequently used in VB
Thats why I say the syntax part is relatively easy - but its not trivial
The semantics - WHAT the developer was trying to do - is MUCH harder
But its the most important part
Based on all the feedback we’ve ever had about the automated tools we did have and that others also created thats where you usually HAVE to audit the conversion & change / fix the results
As soon as you have to do that you are well down the way to rewriting it anyways and the tool hasn’t saved you much