Solved

Converting QBasic to Visual Basic 4.0

Posted on 1998-08-17
3
363 Views
Last Modified: 2013-11-25
I have written a Qbasic screen saver and want to convert and compile it to VB4.0 32-bit for win95/98.  Obviously some of the commands are no longer recognized.  Is there a way to get the conversion done? a manual of sorts with approximate Qbasic/VB commands?
0
Comment
Question by:DKar
3 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1429164
Your basic language contstructs will map across, except for those data based statements like the Field statement, etc, but the underlying structure of your program changes in VB, since it is more an event handler than a procedural language environment.  Screen savers are entirely differrent because of their methods of interacting with the screen cooperatively in a Windows OS, such as WIN95, and in the use of the screen object.  MSDN has articles regarding writting screen savers in VB and I reccomend you get one from the Microsoft Support site.  Of course, you can still run your screen saver in a DOS mode (maybe, some graphics functions honk windows), but you probably want it integrated with the OS.
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1429165
About the only differences I've found between QB and VB are the lack of DATA/READ and the fact that "." is used as a separator in VB where it's a valid variable name char in QB. Most everything else goes right over. You can create a "DOS equivalent" in VB by not using any forms. Create a new project and attach you QB source to it as a .BAS module. Make the start of your code labelled:

Sub Main()

and finish off with

End Sub

Delete any forms associated with it and you should be able to compile.

M

0
 

Author Comment

by:DKar
ID: 1429166
thanks to you both
cymbolic, i have checked the knowledge base, but it doesnt help in knowing how to work around the conversion very much.  mark1250 was close to the crux of the problem with the DATA/READ
remarks as that is where the debug/run stops ... on a READ command saying sub or function not defined.  also i have 5 long data strings to this proggie (a digital colored clock and calendar that can be moved to two other locations on the screen with the spacebar) (esc to exit)  any workarounds to the thing would be helpful...loading th molule without forms was very good idea, just now  the READ.  thanks again in advance
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 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