×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

QBASIC IN Visual BASIC

QBASIC IN Visual BASIC

QBASIC IN Visual BASIC

(OP)
Can BASIC programs written in QBASIC (DOS) be run in VISUAL BASIC?

RE: QBASIC IN Visual BASIC

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

RE: QBASIC IN Visual BASIC

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 (Mid$(A$,32,1) = B$ 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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close