Solved

Converting QBasic to Visual Basic

Posted on 1998-07-02
3
540 Views
Last Modified: 2013-11-25
Is there any tools or programs that converts BASIC PDS 7.1 source code to Visual Basic source code.
I am facing a huge job converting this program.
Any kind of automation would save me a lot of time.
Do You know of any tools or programs to accomplish  this?
0
Comment
Question by:rus
3 Comments
 
LVL 6

Expert Comment

by:alamo
ID: 1464781
My own experience doing this same thing long ago (when VB1.0 was still in beta) was that the event-driven environment was so much different that I threw away all the user interface. The parts of my programs which did all the gut processing and well enough modularized I converted by hand with nothing but search and replace.

I know this isn't much help really, I just wanted to give my experience, and say that converting the UI automatically is often not a good thing anyway, and converting the rest is often not as big a task as it seems. Good luck!
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1464782
I add my voice to alamo.  I did a port of an app from PDS7 to VB3 and there is so much that will be thrown away that a converter would never have worked.  (Even though the boss wanted the UI to not change!)
0
 
LVL 9

Accepted Solution

by:
cymbolic earned 50 total points
ID: 1464783
There are no tools for making the conversion.  Basically (that's a pun) only some of your internal functions will come across unscathed, with very little changes.  Your complete front end, and the central processing model of the older programs has to be rewritten anyway.  Much of the event driven model is not really basic code, it's merely instantiation of controls, and method invoking/event processing on those controls.  There is very little that will make the trip to VB.  Maybe some essential string handling routines, basic binary file i/o, etc.  but the rest of the stuff has to be rewritten.  

To really understand this, just build a simple application in VB to reflect one of your most simple programs in Professional Basic, and the implications will be very clear to you.

You will have a fluency with the basic language that many VB developers miss, since their main focus is on control handling and first instinct seems to be to get a third party control to do the function.  This is not entirely inappropriate, once you realize the complexity of the graphic environment for both screen and printer handling, and the overly complex arrangement of WIN32 calls required, its often much more cost effective to use something that only partially works, since it would take you forever to get it that far yourself.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question