Not really. The biggest problem is that a QBasic program would be riddled with Input and Print statements. The Print statements would sort of work on a form, but it wouldn't scroll like a screen does. The Input statements wouldn't work at all. Neither would most graphics statements, SCREEN statements, or any other hardware control statements.
If you modified it to append output to a text box, and get input via InputBox calls, and it has no graphics, it might get close to working, but I'm not making any promises. And I've forgotten most of my QBasic, so I wouldn't be able to help you with it. Rick Sprague
I've done this with many of my old QB programs. It really isn't as hard as you might think.
Most of the difficult QB code (input, display, file handling and printing) is handled by VB. Basically, you decide where the input will come from, where the output is going and set up your app to look the way you want. Then you pull the calculation subroutines from your QB program and stick them in a VB module. Aside from the input and output methods Rick mentioned, there is very little difference between QB syntax and VB syntax ([tt]Mid$(A$,32,1) = B$[/tt] does the same thing in both languages). You just have to get used to getting input in a different way and sending the output to a message box, text box or label instead of the screen.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.