Kbase 17715: How to use Windows printer dialog with old V6 code.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
How to use Windows printer dialog with old V6 code.
This is a SAMPLE include file that can be inserted before the
OUTPUT TO PRINTER statement for users to choose their printer.
The code was modified from r-prtdlg.p ( Reference Manual under
SYSTEM-DIALOG PRINTER-SETUP statement ).
The cancel button is defined in the code and a trigger can be
added according to the application's needs.
/* print.i */
DEFINE BUTTON bprintset LABEL " Printer Setup ".
DEFINE BUTTON bcancel LABEL " Cancel".
DEFINE FRAME PrintFrame
bprintset bcancel WITH TITLE "Printer Selection"
VIEW-AS DIALOG-BOX.
ON CHOOSE OF bprintset DO:
SYSTEM-DIALOG PRINTER-SETUP.
END.
ENABLE ALL WITH FRAME PrintFrame.
WAIT-FOR CHOOSE OF bprintset, bcancel IN FRAME PrintFrame.
Example Code :
{ print.i }
OUTPUT TO PRINTER.
DISPLAY " This is a test " .
Progress Software Technical Support Note # 17715