how do i copy and paste in QBASIC?

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
jetq111
Newbie
Posts: 6
Joined: Sun Oct 15, 2006 7:03 am

how do i copy and paste in QBASIC?

Post by jetq111 »

hey,
How do i copy stuff from the web (like source code) and paste it into QBASIC? I cant figure it out... Can somone plese help me?

thnxs
4815162342
bungytheworm
Veteran
Posts: 288
Joined: Sat Feb 18, 2006 4:02 pm

Post by bungytheworm »

You cant directly.
Copy source you want, paste it on notepad and save it as filename.bas
If you dont like notepad, you can use any normal _text_ editor program.

Important
Dont use longer file names than 8 chars max
When you save, check that notepad saves it as regular text file.

If you accidently save it as filename.txt, you can still open it with QB Ide, just change "*.bas" to "*.txt" and you should see your file there.
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

You can paste it directly but it doesn't always give the desired results. Always, it would help to specify the version of Windows you're using, as the method varies. In XP, you can right-click on the command prompt's title bar, go to Edit and then click Paste. In 9x, there's actually a Paste button on the command prompt's toolbar that makes it easier.
User avatar
Skyler
Coder
Posts: 16
Joined: Wed Jun 07, 2006 4:15 pm
Location: Delta Quadrant

Post by Skyler »

In most versions, I think you just right-click on the screen in windowed mode. That's what I do... Win2K I think.
For God so loved the world he gave His only begotten Son that whosoever believeth on Him shall have everlasting life.
John 3:16
iamdenteddisk
Veteran
Posts: 185
Joined: Mon Jun 30, 2008 4:10 pm

pasteing to qb

Post by iamdenteddisk »

perhaps this would be an inspiration to create a clipboard to use with windows and qb .anyone?
Ralph
Veteran
Posts: 148
Joined: Fri Feb 09, 2007 3:10 pm
Location: Katy, Texas

Post by Ralph »

To Paste in QB, click on the left-topmost corner of the windowed QB screen, or just to the left of the QuickBASIC name, choose Edit, Paste, done.

SUBs hae a little problem, in that two, instead of one, END SUB appear at the bottom of each SUB, so, one must be removed.

Also, indentation is sometimes a big bother.

Finally, there are one or two irritating bugs that happen, from time to time.

|Best way is to Paste the code into WordPad, NotePad, or even MS Windows, and save that file as a text file, with the ending .txt. To open in QB, look for .txt files, or, before searching, change its extension to .bas.
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish
Post Reply