lOldVisible = _SCREEN.Visible _SCREEN.Icon = "MyCustomLogo.ico" _SCREEN.Caption = "My Custom App's Name Report (Preview)" ** Maximize VFP _SCREEN _screen.windowstate = 2 ** Show the VFP _SCREEN. IF _SCREEN.Visible = .F. _screen.Visible = .T. ENDIF ** Create a window to send the report to. DEFINE WINDOW wReportPreview ; FROM 0, 0 TO 10, 10 ; TITLE "Print Preview" ; SYSTEM NOFLOAT ZOOM CLOSE ; IN SCREEN ** Maximize the window. This must come after the ** _screen.maximize, or the preview window may ** not be big enough. ZOOM WINDOW wReportPreview MAX ** Do report REPORT FORM MyReport NOCONSOLE PREVIEW WINDOW wReportPreview ** Drop the window definition RELEASE WINDOWS wReportPreview ** Set the screen back to the way ** we found it. IF lOldVisible = .F. _SCREEN.Visible = .F. ENDIF