Solved

Converting QBasic to Visual Basic 4.0

Posted on 1998-08-17
3
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need an intro to -- .Net SQL Authorization Manager 7 101
VBA Shell can't Find Word document 11 155
Recommendation vb6 to vb.net or others 14 241
Export Data to Different .csv Files 27 133
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

751 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