Software Archive
Read-only legacy content
17061 Discussions

Sending screen graphics to printer

Intel_C_Intel
Employee
248 Views
My co-worker Dan Porga wrote a QuickWin program, but to print, we press CTRL-PrintScreen, Paste the clipboard into MS PhotoEditor and then print the resulting BMP.

Although this works fine, it's tedious. Is there code that will automate this for us? Ideally, we'd like to click on a "Print" button and have the screen sent to the printer, without having to fool with the clipboard and PhotoEditor.

TIA.
0 Kudos
4 Replies
Steven_L_Intel1
Employee
248 Views
Um, what about the File..Print menu item in the QuickWin window? I think you can also use CLICKMENUQQ with the WINPRINT function code to have this under program control.

Steve
0 Kudos
Intel_C_Intel
Employee
248 Views
Steve,

I have tried your suggestion for putting printing from QuickWin under program control without success. The problem is that in the call:

result = CLICKMENUQQ (item)

Item may only have the values 1 to 4 as given in DFLIB.F90

? QWIN$STATUS - Status command item = 1
? QWIN$TILE - Tile command item = 2
? QWIN$CASCADE - Cascade command item = 3
? QWIN$ARRANGE - Arrange Icons command item = 4

I have tried to fool it by shifting the position of items in the menu, but it is not deceived. Other values of item cause access violations.

Any ideas, or is another routine akin to Fortran_WinPrint needed?
0 Kudos
Steven_L_Intel1
Employee
248 Views
Use CLICKMENUQQ(LOC(WINPRINT)) - sorry for missing that detail. I know it's not documented, but it works.

Steve
0 Kudos
Intel_C_Intel
Employee
248 Views
Steve,

It now works perfectly - many thanks!
0 Kudos
Reply