Announcement

Collapse
No announcement yet.

Do a print screen from Dos?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Georg Potthast
    replied
    I have a related question:

    using the VESA bios extension I have set my screen to truecolor, 1024x768 mode. Does anyone have a suggestion how to print this screen without using windows? Dos used to have graphics.com but this seems to be no longer available and may not support this mode.

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

    Leave a comment:


  • Lance Edmonds
    replied
    I described that requirement in the message given in the link above.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • David Gimeno
    replied
    Have you tried to uncheck PrintScr box in Properties window
    of the MSDOS icon ?




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

    Leave a comment:


  • Mel Bishop
    replied
    originally posted by tom hanlin:
    ....i'm not sure if prtsc can be trapped...
    http://www.powerbasic.com/support/pb...read.php?t=698

    2nd from the last post.
    ------------------


    [this message has been edited by mel bishop (edited february 20, 2003).]

    Leave a comment:


  • Tom Hanlin
    replied
    As Mel says, when your program is running under Windows (even in a
    DOS box), "print screen" doesn't print the screen-- it results in
    the screen image being stored as a bitmap in the clipboard. If you
    want to print your program's screen as text, you'll need a custom
    routine like Mel suggests. I'd revise this a little:
    Code:
    for row = 1 to pbvScrnRows
        st$ = space$(pbvScrnCols)
        for col = 1 to pbvScrnCols
            mid$(st$, col, 1) = chr$(screen(row, col))
        next col
        lprint rtrim$(st$)
    next row
    Depending on the width of the current display line and the number
    of columns supported by the printer, you might need to adjust the
    LPRINT so the text wraps neatly.

    You can use ON KEY to trigger this routine. I'm not sure if PrtSc
    can be trapped-- you might need to choose another key.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Matthew Berg
    replied
    If you want to activate the built-in print screen routine used by the Print-Scrn button, try the following code:
    Code:
    DIM lpnPrintScreenStatus AS BYTE POINTER
    ...
    LET lpnPrintScreenStatus = &H00500000
    IF @lpnPrintScreenStatus = &H00 THEN CALL INTERRUPT &H05
    ------------------
    If you try to make something idiot-proof, someone will invent a better idiot.

    Leave a comment:


  • Robert E. Carneal
    replied
    Is your program running under DOS, or under a DOS box in Windows?
    It is running under a DOS box.

    Do you want the program to cause a screen print, or do you want to
    be able to press PrtSc to print the screen?
    I was hoping for <U>both</U> please, but if there are restrictions I can use
    either one.

    Robert

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

    Leave a comment:


  • Tom Hanlin
    replied
    Is your program running under DOS, or under a DOS box in Windows?

    Do you want the program to cause a screen print, or do you want to
    be able to press PrtSc to print the screen?

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Mel Bishop
    replied
    If you are working from a windows DOS box, I'm pretty sure that
    windows still intercepts the print screen and sends it to the
    clipboard.

    You may be able to get away with:

    for row = 1 to 25
    for col = 1 to 80
    y = screen(row,col)
    lprint;chr$(y);
    next col
    next row

    You may have to adjust the printer port options in control panel
    to use this but it should work.


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

    Leave a comment:


  • Robert E. Carneal
    started a topic Do a print screen from Dos?

    Do a print screen from Dos?

    Hey guys, is it possible to do a print screen from DOS in
    Power Basic? I am working on it, but so far no. Anyone know of
    a way to do it?

    I +can+ do a work-around simply just printing the last 24/25
    lines sent to the screen and send those to the printer, but it is
    a lot of code!

    Thank you.

    Robert Carneal



    [This message has been edited by Robert Carneal (edited February 20, 2003).]
Working...
X