Solved

Converting QBasic to Visual Basic 4.0

Posted on 1998-08-17
3
361 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is IHttpActionResult a promise pattern? 2 56
Access Object Property from VBA Module in Excel 2010 2 27
Help me. 3 45
Licensing Sharepoint 2016 for developers 11 28
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now