printing

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

guest

printing

Post by guest » Sat Dec 31, 2005 3:21 pm

i have a graphic using a few "line" commands. how can i send that graphic to my printer

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Re: printing

Post by Z!re » Sat Dec 31, 2005 4:41 pm

guest wrote:i have a graphic using a few "line" commands. how can i send that graphic to my printer
You cant. This has already been answered, dont spam the board.
I have left this dump.

Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Post by Antoni » Sat Dec 31, 2005 8:36 pm

I would not say it can't be done...

The easiest way is to convert the graphics to a standard format (bmp, gif) in QB then open it with Windows paint to print it. You could use too a DOS screen capture program. Plasma has one of them in his site. It is not garanteeed to work in all screen modes.

Pure Dos was able fifteen years ago to dump a graphical screen to an IBM-Proprinter compatible printer if you loaded GRAPHICS.COM before. Unforunately no present printer supports the IBM-Proprinter command and GRAPHICS.COM does not work in the present DOS boxes inside Windows

If your printer is able to print text from DOS programs you could implement a graphics driver for it, provided you find the graphics command list for the printer. It would work only with your brand of printer...

Guest

Post by Guest » Sun Jan 01, 2006 12:39 pm

i have no idea if this could even work, but how about displaying the graphics and putting Crtl+PrtScn into the keyboard buffer?
i can't log in-raybritton

Guest

Post by Guest » Sun Jan 01, 2006 2:31 pm

Ray,

I posted this a week ago. Maybe it can help you.
..... regarding line drawing characters.
In WORD 2003 of Windws XP or WORD of Windows 2000, you can see line drawing characters by doing the following:
1) Print to a file with a different file extension, like .FIL
2) Get into WORD, and open the file.
3) Word presents a small window called "File Conversion". In this window, select "OEM United States" from the menu.
4) Word will now show your text with the proper line drawing characters.
5) You can now print this Word file.
Try it.
*****

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sun Jan 01, 2006 2:32 pm

There had got to be some way to make the motherboard/OS think that the PrntScrn key was pressed.
Image

moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo » Sun Jan 01, 2006 2:34 pm

Ray, the previous guest post was mine. Still having login problems.
*****

RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Post by RayBritton » Mon Jan 02, 2006 5:43 am

moneo, i meant type print or clicking a button, for a program
BTW i wasn't the person who orignally posted

guest

Post by guest » Mon Jan 02, 2006 5:45 pm

thats a good idea how do you make the graphic a file in qbasic?

Guest
Veteran
Posts: 128
Joined: Sun Aug 14, 2005 8:33 pm
Location: Forest Lake, MN
Contact:

Post by Guest » Mon Jan 02, 2006 7:02 pm

Doesn't the LPRINT command send commands to the printer?

moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo » Mon Jan 02, 2006 8:32 pm

guest wrote:thats a good idea how do you make the graphic a file in qbasic?
Oh, oh, I think I messed up, sorry. I was talking about printing out "line drawing characters", but you guys are talking about graphics on the screen produced by the line statement. Two totally different things.

The line statement outputs only to the screen. I have no idea how to get the contents of the screen onto a file, and whether that file could be printed properly. Years ago I did see some "screen capture" utilities, but don't know if they're still available.
*****Moneo*****

Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Post by Antoni » Tue Jan 03, 2006 5:38 am

Try this screen grabber to get the screen to a file, then you can print it thru a
graphics editor
http://www.phatcode.net/downloads.php?id=194

User avatar
Zim
Veteran
Posts: 98
Joined: Mon Dec 05, 2005 4:31 pm
Location: Wisconsin, USA
Contact:

LPRINT

Post by Zim » Wed Jan 04, 2006 12:24 pm

Doesn't the LPRINT command send commands to the printer?
Lprint DOES send data to the printer, but only text such as the contents of string or numeric constants or expressions, like

Code: Select all

LPRINT "Hello"
LPRINT num+6
He's trying to print graphics, which in the case of DOS is easy by pressing the PrtScrn key. In windows I thought this key just caused a screen capture which could be pasted (Ctrl+V) into any compliant app... no?
--- Zim ---
--- Time flies like an arrow, but fruit flies like a banana ---

Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Re: LPRINT

Post by Antoni » Wed Jan 04, 2006 3:44 pm

z!re wrote: He's trying to print graphics, which in the case of DOS is easy by pressing the PrtScrn key. In windows I thought this key just caused a screen capture which could be pasted (Ctrl+V) into any compliant app... no?
In dos PrnScrn only worked if you loaded GRAPHICS.COM at the DOS start. The windows screen capture does not work in fullscreen modes.

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Re: LPRINT

Post by Z!re » Wed Jan 04, 2006 3:55 pm

Antoni wrote:
z!re wrote: He's trying to print graphics, which in the case of DOS is easy by pressing the PrtScrn key. In windows I thought this key just caused a screen capture which could be pasted (Ctrl+V) into any compliant app... no?
In dos PrnScrn only worked if you loaded GRAPHICS.COM at the DOS start. The windows screen capture does not work in fullscreen modes.
I never said that...
I have left this dump.

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Wed Jan 04, 2006 8:49 pm

That doesn't mean it isn't true.
Image

User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Re: LPRINT

Post by The Awakened » Wed Jan 04, 2006 11:12 pm

Antoni wrote:
z!re wrote: He's trying to print graphics, which in the case of DOS is easy by pressing the PrtScrn key. In windows I thought this key just caused a screen capture which could be pasted (Ctrl+V) into any compliant app... no?
In dos PrnScrn only worked if you loaded GRAPHICS.COM at the DOS start. The windows screen capture does not work in fullscreen modes.
It works for me. I just hit the Print Screen button, go into Paint, Edit --> Paste, and pow, it's there.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."

User avatar
The Walrus
Veteran
Posts: 85
Joined: Fri Apr 01, 2005 7:19 am
Location: Denmark
Contact:

Post by The Walrus » Thu Jan 05, 2006 8:00 am

It's only in NT based Windows versions you can't use Print Screen in fullscreen modes.
If swimming is so good for your figure, how do you explain walruses?

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Thu Jan 05, 2006 10:24 am

The Walrus wrote:It's only in NT based Windows versions you can't use Print Screen in fullscreen modes.
Just tried, I can take a screenshot of the QB IDE in fullscreen mode..
Windows 2000 Professional
I have left this dump.

User avatar
Zim
Veteran
Posts: 98
Joined: Mon Dec 05, 2005 4:31 pm
Location: Wisconsin, USA
Contact:

Re: PrtScrn

Post by Zim » Thu Jan 05, 2006 12:02 pm

Antoni wrote: In dos PrnScrn only worked if you loaded GRAPHICS.COM at the DOS start...
In the VERY old days of DOS, PrtScrn worked without GRAPHICS.COM loaded, but that was back when CGA was the highest resolution (640x200). As QuickBASIC began to support higher resolutions, such as EGA (640x350) you needed to have GRAPHICS.COM loaded. That was a boon to us back then. We could actually print an EGA screen with just the press of a button! Imagine!
--- Zim ---
--- Time flies like an arrow, but fruit flies like a banana ---

Post Reply