Not a month goes by where we don’t get a prospective client asking about the possibility of converting their old (but working) VB6 application to Xojo. They always tell me that their project is working great in Windows 7 and Windows 8. Then comes the but. But, they feel that they’re living on borrowed time and it’s only a question on WHEN Microsoft pulls the plug on compatibility not a matter of IF.
Let’s face it. VB6 Service Pack 6 was released in 1998 and official support ended in 2008. I think it’s a testament to its power and popularity that developers are still using it five years after support was ended. It may also be an indictment of how many felt abandoned by Microsoft in the move to .NET.
So the questions I end up answering for many are these:
Can we convert their VB6 application to Xojo?
The answer is generally yes. I’ve come across few projects that can’t (or shouldn’t) be done in Xojo. There are some caveats, though, because Xojo is a cross-platform programming tool.
If you’re looking for fancy grids that you rely upon in Windows you’ll be disappointed. As a cross-platform tool some controls are the least common denominator simply because Mac OS X doesn’t support or encourage the same types of grid components. Apple encourages simplicity which forces different design considerations. Linux has differences too that force compromises.
Reporting isn’t nearly as robust in Xojo as in VB6 either. While it’s true that Xojo has built-in reporting components most developers I know find it too weak for anything beyond simple reports. There are a number of third party reporting tools (including BKeeney Shorts, our particular solution) but none of them are as easy, mature, and integrated as Crystal Reports.
Can we easily convert their project to Xojo?
This answer is a definite no. I don’t care what anyone says, running your VB6 project through any of the available converters will not result in good Xojo code. From experience, you’ll end up spending more time fixing the things that it didn’t convert properly than if you had just started from scratch. In our opinion it’s much easier to rewrite the application in Xojo rather than convert it.
That’s not saying you can’t reuse major portions of the VB6 code in Xojo but, as a developer, I want to analyze it and choose what I want to port rather than having it bring over everything. There are a couple of reasons for this.
- This first is that Xojo is really good at subclassing controls. VB6 was horrible at it and many developers have extensive classes and modules to work around this fact. Little to none of the code that’s in those classes and modules is necessary in Xojo.
- The second is that Xojo is pretty good at threading. Much of the app.doevents code you’ve had to add in your VB6 project because of tight loops to avoid the UI from freezing you’ll do away with and put into a thread in Xojo. There are some caveats with threads in Xojo but generally it’s a better way to deal with time consuming operations that might otherwise freeze the user interface.
- The third is that the VB6 best way to do something may not be the best way to do it in Xojo. A number of years ago we converted a simulation application from VB6 to Xojo (then called Real Studio). The project used an insane number of control arrays with various levels of overlapping controls. The logic was very convoluted. Rather than try to duplicate the exact same functionality in the same way in Xojo, we were able to greatly simplify the logic and put everything in simple classes. The ‘unit’ in the simulation handled all of its own actions and generated events for the UI to respond to. The UI simply passed the user action into the appropriate class instance. Everything was encapsulated in the classes and in the long run they could have used the same UI front end for any number of different simulations. It wasn’t the VB6 way and it took some convincing that it was a better Xojo way. In the end they were happy with the results with a solution that ran on Windows and Macintosh (and Linux if they had requested it).
So why bring all this up? For some reason a lot of people have hit a previous blog while searching about Windows 8 and VB6 during the past month. I did some checking and while Microsoft has said Windows 8 would still have VB6 compatibility built-in, some developers have had issues in Windows 8.1 The workarounds seem to be fairly simple, but I think most people still using VB6 are wondering if this will be the last version of Windows that will still have that. VB6 does work in Windows 8.1 but will this be the last version? Only Microsoft can answer that but given their stated intentions of doing annual updates like Apple it seems likely at some point they’ll jettison some backwards compatibility.
Also a consideration for many of them is Mac compatibility and to a lesser extent Linux. Ten years ago the Mac version was an afterthought for many of our clients. Now, not so much, in that they need a Mac version to satisfy their customers or personnel. The past couple of desktop projects have actually been Mac first and then Windows. How times change.
Finding Xojo Developers
I’ll put a plug in for ourselves https://www.bkeeney.com/bkeeneyconsulting/. We’ve converted dozens of VB6 projects to Xojo. Contact us if you’d like a quote. You can even put your application through our VB6 Analyzer (https://www.bkeeney.com/vb2rbconversion/) so we can get some metrics about what all is in your VB6 project. The beauty of the analyzer is that we never have to see your project to give you a rough estimate of the cost to convert.
You can also request the Xojo Developers Network to get in touch with you. Simply fill out the request at http://xojo.com/support/consultants.php and Xojo developers will contact you if they’re interested in your project.
Support for VB6 ended a long time ago but based on the number of contacts I get it is certainly not dead yet.