Hi.
Qbasic programs (via v 4.5), that have a screen output (small graphic)
would always produce a printout via PrtScn and Paste (into say Word).
Now that I am using Windows XP, this does not produce a printout.
(Windows Me .. Windows 98 .. still enable a prntout)
It has been suggested that I should use an alternative Qbasc that will let me compile my program and this would then let me get a printout.
Can anyone advise me how to proceed?
I have a small program that I could post here, if that would be of any use.
Regards
Windows XP .. QBasic 4.5 .. 512 Mb RAM .. Geforce 5200 .. USB Epson Printer ..
Qbasic Screen output not printable.
Moderators:Administrator, Global Moderator
As you can see from my "signature" below, I am using QuickBASIC 4.5, running in Windows XP Home Edition.
I opened the Clipboard (clipbrd.exe, which I found inn C:\WINDOWS\system32\), did a PrtScreen, and saw my present screen appear on the Clipboard. I Opened Word, and did a Ctrl+v, and it pasted the screen saved in the Clipboard.
I opend QuickBASIC 4.5, opened a program, did a PrtScreen, and that screen appeard on my Clipboard. I did a Ctrl+v in Word, and the screen with the program was pasted to Word.
I tried just pressing PrtScreen, as well as pressing Ctrl+PrtSreen. Both worked the same, copying the current screen into the Clipboard.
I also tried this: In my program, I wrote these lines:
ran the program, and my HP LaserJet 4L printer spit out the line,
This should print out.
So, I can't get any problems of the type you are reporting. Maybe you need to do a form feed? Usually, if you quit QuickBASIC, it will send a form feed to the printer, to flush out any thing in its buffer. Does this happen to you? If so, you can add the form feed line I added to my program, as well as the END line, and it should print out whatever you sent to the printer's buffer.
One more thing: make sure you have updated your Windows XP with Service pack 2!
I opened the Clipboard (clipbrd.exe, which I found inn C:\WINDOWS\system32\), did a PrtScreen, and saw my present screen appear on the Clipboard. I Opened Word, and did a Ctrl+v, and it pasted the screen saved in the Clipboard.
I opend QuickBASIC 4.5, opened a program, did a PrtScreen, and that screen appeard on my Clipboard. I did a Ctrl+v in Word, and the screen with the program was pasted to Word.
I tried just pressing PrtScreen, as well as pressing Ctrl+PrtSreen. Both worked the same, copying the current screen into the Clipboard.
I also tried this: In my program, I wrote these lines:
Code: Select all
LPRINT "This should print out"
LPRINT CHR$(12) 'this is a form feed to the printer
END
This should print out.
So, I can't get any problems of the type you are reporting. Maybe you need to do a form feed? Usually, if you quit QuickBASIC, it will send a form feed to the printer, to flush out any thing in its buffer. Does this happen to you? If so, you can add the form feed line I added to my program, as well as the END line, and it should print out whatever you sent to the printer's buffer.
One more thing: make sure you have updated your Windows XP with Service pack 2!
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.
-
- Newbie
- Posts:1
- Joined:Thu Jun 23, 2005 12:08 am
- Location:United Kingdom, Yorkshire
Hi.
Delighted with the prompt reply.
You are quite correct in what you have reported ...
But your output is text, not a graphic.
The problem seems to be the SCREEN instruction.
Would you like to try this program, please ...
10 REM ***STAR FRACTAL***
20 REM ***NAME:STAR***
30 SCREEN 12: CLS : PI = 3.141593
40 WINDOW (-.5, -.8)-(1.5, .7)
50 P = 5: V = 4: A = 144: R = .35: A = A * PI / 180
60 PSET (0, 0): X = 0: Y = 0
70 FOR N = 0 TO (V + 1) * V ^ (P - 1) - 1
80 M = N: B = N * A: F = 0
90 IF M MOD V <> 0 OR F >= P - 1 THEN GOTO 110
100 F = F + 1: M = INT(M / V): GOTO 90
110 X = X + R ^ (P - F - 1) * COS(B): Y = Y + R ^ (P - F - 1) * SIN(B)
120 LINE -(X, Y)
130 NEXT N: BEEP: A$ = INPUT$(1): END
It gives a pretty Star ouptput to the screen, but I am not able to get a print of this star when using Qbasic in Windows XP.
Windows 98 and Windows Me both let me get a printout.
I am advised that a Quick Basic (not Qbasic) will let me compile my program, and this compliled version might give me a printout.
Can anyone try this and let me know.
Regards.
Delighted with the prompt reply.
You are quite correct in what you have reported ...
But your output is text, not a graphic.
The problem seems to be the SCREEN instruction.
Would you like to try this program, please ...
10 REM ***STAR FRACTAL***
20 REM ***NAME:STAR***
30 SCREEN 12: CLS : PI = 3.141593
40 WINDOW (-.5, -.8)-(1.5, .7)
50 P = 5: V = 4: A = 144: R = .35: A = A * PI / 180
60 PSET (0, 0): X = 0: Y = 0
70 FOR N = 0 TO (V + 1) * V ^ (P - 1) - 1
80 M = N: B = N * A: F = 0
90 IF M MOD V <> 0 OR F >= P - 1 THEN GOTO 110
100 F = F + 1: M = INT(M / V): GOTO 90
110 X = X + R ^ (P - F - 1) * COS(B): Y = Y + R ^ (P - F - 1) * SIN(B)
120 LINE -(X, Y)
130 NEXT N: BEEP: A$ = INPUT$(1): END
It gives a pretty Star ouptput to the screen, but I am not able to get a print of this star when using Qbasic in Windows XP.
Windows 98 and Windows Me both let me get a printout.
I am advised that a Quick Basic (not Qbasic) will let me compile my program, and this compliled version might give me a printout.
Can anyone try this and let me know.
Regards.
Windows XP : 512 SDRAM : Geforce 5200: ex BBC Basic : now QBasic 4.5 Interpreter:
Longfellow:
As I have stated, I am using QuickBASIC Version 4.5 (the most popular version around), on Windows XP Home Edition.
If I run any .bas program with the SCREEN statement, my program shows the first screenful for a few seconds, then minimizes!
If I run a compiled (.exe) BASIC program, it just shows a full, black screen for a few seconds, then minimizes.
That is, I fare better without compiling than with.
So, I can't help you on your current PrintScreen problem, sorry.
As I have stated, I am using QuickBASIC Version 4.5 (the most popular version around), on Windows XP Home Edition.
If I run any .bas program with the SCREEN statement, my program shows the first screenful for a few seconds, then minimizes!
If I run a compiled (.exe) BASIC program, it just shows a full, black screen for a few seconds, then minimizes.
That is, I fare better without compiling than with.
So, I can't help you on your current PrintScreen problem, sorry.
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.
Say, I just ran across some great printing information, including how to print out a QB graphics screen! Here's the link to that site:
http://www.network54.com/Forum/message? ... 1047390256
I am going to be trying this out in a few hours, I hope.
http://www.network54.com/Forum/message? ... 1047390256
I am going to be trying this out in a few hours, I hope.
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.