Printing VGA graphics in QB 4.5 
Author Message
 Printing VGA graphics in QB 4.5

Hi there,
I'm a newbie here. I wonder if any of you out there can help me in
automatic printing of color VGA screen (screen mode 12 or 13) to a color
printer such as HP DeskJet 550C?
Here is my situation. I'm writing a program that can monitor
temperatures from 100 of equipments (using SCXI devices from National
Instruments and Quick Basic 4.5). Then I plot graphs on VGA screen (with
different colors). Is there any simple way to print this screen in the
QB program (by the program not by manually pressing shift-prtscr), such
as every other day or once a week?
Any comments or input will be greatly appreciated. Thanks in advance.
Choul-Gyun Lee


Sun, 21 Sep 1997 03:00:00 GMT  
 Printing VGA graphics in QB 4.5
Hi, expert programmers,

Since I haven't heard anything from my origianl posting, let me make my
question simpler. Is there any way to make QB (version 4.5) program
think as if shift-printscreen is pressed (so that DOS's TSR, GRAPHICS,
print the VGA graphics)?

Any comments/suggestions are welcome and will be greatly appreciated.
Please help.

Regards,
Choul-Gyun

          **************************************************

          * Dept. of  Chem. Eng. *    Tel: (313)  763-5259 *
          * Univ.  of  Michigan  *    Fax: (313)  764-7453 *
          *    WWW Page: http://www.engin.umich.edu/~leecg *
          **************************************************



Mon, 22 Sep 1997 03:00:00 GMT  
 Printing VGA graphics in QB 4.5
Yes.
Eons ago, I used GWBASIC.  Now I do not remember the details.  But

Do U know any assembler ?
No ?  
Do  U know DEBUG ?
---------------------
DEBUG PS.COM
A
INT 5
INT 20
RCX
3
W
Q
----------------------

IN BASIC:
.
.
.
SHELL"PS.COM"
----------------------

What DEBUG does, is poduce a 3byte machine language .com file, to print
the screen (using interrupt 5).
---------------------------------------

(
Acually I used a simpler  trick, : -

1- define a  single-precision  GWBAISC floating number  (actually that
number= the 3byte above-mentioned com file, plus a pad byte)

2- use the call statement, to call that number.

No SHELLing needed.
)

-------------------------------------------------------

As 4 every time of the day

U either write it in BASIC, using the time$ function & an edless loop
(U would have 2 SHELL to a DOS  complex batch file that uses the DS
date command, & that gets messy)

or

down load a ready-made  shareware that  runs  a program  every certain
time/date.

U can  even  write it  thyself, if   thou art  versed  in  the  arcane
mysteries of batch files (esp errorlevel).

Email me I U need more help, or just 2 let me know how U r doin.



Wed, 24 Sep 1997 03:00:00 GMT  
 Printing VGA graphics in QB 4.5

IC>Hi, expert programmers,

IC>Since I haven't heard anything from my origianl posting, let me make my
IC>question simpler. Is there any way to make QB (version 4.5) program
IC>think as if shift-printscreen is pressed (so that DOS's TSR, GRAPHICS,
IC>print the VGA graphics)?

IC>Any comments/suggestions are welcome and will be greatly appreciated.
IC>Please help.

       Yea, it's interrupt #5 that called the printscrn function.

' INCLUDE: 'QB.BI'
' Print the screen
DIM Regs AS RegType
Interrupt &H05, Regs, Regs
END

*NOTE: you have to include the QB.BI for this to work.


--
        ***Gary's Place BBS - 412 326-4039 - Internet e-mail and news***        



Wed, 24 Sep 1997 03:00:00 GMT  
 Printing VGA graphics in QB 4.5
: Hi, expert programmers,

: Since I haven't heard anything from my origianl posting, let me make my
: question simpler. Is there any way to make QB (version 4.5) program
: think as if shift-printscreen is pressed (so that DOS's TSR, GRAPHICS,
: print the VGA graphics)?

: Any comments/suggestions are welcome and will be greatly appreciated.
: Please help.

: Regards,
: Choul-Gyun

I guess the easyest way to do that would be to call the "print screen"
interrupt.  This is INT 05h.  This is the interrupt that is called when
you hit the "print scrn" button on your keyboard.  If you want to program
the printer yourself, look in the HP deskjet manual and see what the
codes are to send to the printer.  After programming the printer then
just send the data to be printed.



Thu, 25 Sep 1997 03:00:00 GMT  
 Printing VGA graphics in QB 4.5

Quote:

>Since I haven't heard anything from my origianl posting, let me make my
>question simpler. Is there any way to make QB (version 4.5) program
>think as if shift-printscreen is pressed (so that DOS's TSR, GRAPHICS,
>print the VGA graphics)?

Load GRAPHICS.COM (part of DOS) first. Then CALL Interrupt 5 from QB.

-----------------------------------------------------------------------
     Juan A. Vignolo B.           Universidad Catolica de Valparaiso

-----------------------------------------------------------------------



Sat, 27 Sep 1997 03:00:00 GMT  
 Printing VGA graphics in QB 4.5
Hi,

Quote:
> >Is there any way to make QB (version 4.5) program
> >think as if shift-printscreen is pressed (so that DOS's TSR, GRAPHICS,
> >print the VGA graphics)?

This is the code I use:
        PrtScr$ = chr$(&HCD) + chr$(&H5) + chr$(&HCB)
        REM         [int]         [05h]       [retf]
        DEF SEG = VARSEG(PrtScr$)
         addr& = 256 * PEEK(VARPTR(PrtScr$)+3) + PEEK(VARPTR(PrtScr$)+2)
         CALL ABSOLUTE(addr&)
        DEF SEG

To use this, you must start QuickBasic with the /lQB option, to make the
CALL ABSOLUTE function availiable (it lives in the QB.QLB and QB.LIB files)

Hope that helps,
        Chris Softley

1 word = 2 bytes = 4 nybbles  => conversation = PAIN!



Tue, 30 Sep 1997 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. QB 4.5 VGA GUI+Graphics

2. Incorporating non-QBasic graphics into QB 4.5 programs

3. Help QB 4.5 Graphics...

4. QB 4.5 graphics speed?

5. QB 4.5 Printing to printer LPT2

6. QB 4.5 Printing Problems on Novell LAN

7. QB 4.0 Docs/QB 4.5 Wanted

8. want QB 4.5 QB 7.1 FOR FREE!!!

9. Where's QB.LIB in QB 4.5?

10. QB 4.5: reading 16 bit from a port

11. QB 4.5 - Expression too complex

12. WTB: QB 4.5 Book!

 

 
Powered by phpBB® Forum Software