?
Solved

gwbasic to vb

Posted on 2001-07-29
12
Medium Priority
?
591 Views
Last Modified: 2012-05-04
I need to convert GWbasic to vb. I know that is probably impossible, but how can i at least get gwbasic file to a .txt file so I can print it out?  I cant print from gwbasic because my usb printer wont capture the port
0
Comment
Question by:mmcmillen
[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
  • 3
  • 2
  • +4
12 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6332799
Isn't it a .bas file? If so, it is simply a text file. You can open it from the Notepad and print it.
0
 
LVL 3

Accepted Solution

by:
GeneM earned 400 total points
ID: 6332879
Is this a test of our memories??  :-)

Is I recall, to save a GWBasic file as text, you entered something like the following when you save the file:
   Save  "FileName.BAS",A

The A at the end meant save it as ASCII.

I hope this helps.
0
 
LVL 3

Expert Comment

by:GeneM
ID: 6332884
Maybe I was too brief in my explanation.  In order to get a GWBASIC file into ASCII, you must load the file into the GWBASIC editing program.  If you do not know how to do that, or if you do not have GWBASIC, just let us know.  

Once you have it loaded, just save it as I said earlier.  

  SAVE "FileName.BAS",A
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Expert Comment

by:KDivad
ID: 6332985
Ah, the memories...

Never used GWBasic, but I did use BasicA. I believe that was how you saved in it, so it may be the same.
0
 
LVL 3

Expert Comment

by:andysalih
ID: 6333024
like somebosy already stated

the .bas is a text file, you can open it up notepad copy the code.


then open vb up and paste it,

they start converting it that way, making sure that you allocate your objects to the code.


cheers
#andy
0
 
LVL 5

Expert Comment

by:KDivad
ID: 6333034
Not always. They typically saved to a binary file by default. Faster save/load and smaller file.
0
 
LVL 2

Author Comment

by:mmcmillen
ID: 6334238
I have gwbasic, and a vague, really vague memory of using it.  I tried opening the .bas file in vb as well as notepad. It isn't in ASCII completely.  I will try the save ,A function at home.  
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6335374
Once you have the program back into ASCII code, open VB, insert the code as a module, then add a button to the form with code behind it to access the subroutines.

You'll print that certain things are not compatible (such as the "sound" command) but most will translate very nicely.  Also, the print commands will get dumped onto the form background, so you may want to place the button out of the way, and set the form's autoredraw property to true.
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 6336346
well for my 2 bits
dont do it, start from scratch with vb it will probably save you some headaches
0
 
LVL 5

Expert Comment

by:KDivad
ID: 6339746
I agree with that completely. Tried it myself once. It got a lot easier when when I just used the project for ideas instead of for the code.
0
 
LVL 2

Author Comment

by:mmcmillen
ID: 6340266
I dont want to convert to vb. I am going line by line and rewriting but I have the following problem(s)...

I have a usb printer which wont allow me to print from dos or capture a lpt port. So I cant print the code.

I want the code in a text file so i can at least scroll through it, not see 10 lines of code at a time, and have to type in a new line number range everytime I have to move.



By the way, I couldnt get the save ,A  thing to work...
0
 
LVL 2

Author Comment

by:mmcmillen
ID: 6352256
I was leaving the ending "   before the ,A.   Works great. Now I just have to trudge through the old code and rewrite.  Thanks
0

Featured Post

Independent Software Vendors: 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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 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