Hi Everyone,
Trying to tame and improve print preview under VFP9. Searched msgs here to get some ideas. Following code works well but:
1) the preview window is a 2nd window inside the window specified (looks wierd)
2) you cannot close the preview window clicking on the "X" on the outermost window
IF .ilPreviewReportFirst
STORE CREATEOBJECT("form") TO loPreviewWindow
WITH loPreviewWindow
.Width = 835
.Height = 875
.Caption = "Print Preview"
.Show()
ENDWITH
STORE " PREVIEW IN WINDOW (loPreviewWindow.Name)" TO lcPreviewClause
KEYBOARD "{CTRL+F10}" PLAIN
ENDIF
REPORT FORM (.icTempFrxFileName) TO PRINTER &lcPrintDialogClause ;
&lcPreviewClause NOCONSOLE OBJECT loReportListener
Thanks,
Albert