Dear all,
when start the print preview from a dialog, it is open into the main windows, under the dialog.
I need open it in another window, or that the printer open up the dialog.
FUNCTION Main()
LOCAL oWnd
DEFINE Window oWnd MDI
ACTIVATE WINDOW oWnd ON INIT ( /*oWnd:Hide(),*/ Start( oWnd ) ) // MINIMIZED
RETURN Nil
STATIC FUNCTION start( oWnd )
LOCAL oDlg, oBtt
DEFINE DIALOG oDlg OF oWnd
@ 1,1 BUTTON oBtt ACTION PrintTest( oWnd )
ACTIVATE DIALOG oDlg CENTERED
oWnd:END()
RETURN Nil
STATIC FUNCTION PrintTest( oWnd )
LOCAL oPrn, oDlg
PRINT oPrn NAME "Test fivewin" PREVIEW MODAL
// IF Empty( oPrn:hDC )
// IF oPrn:hDC <> 0
// MsgStop( cPrinter + " is not ready!!" )
// ELSE
// MsgINfo( "Printing!" )
// ENDIF
DEFINE dialog oDlg OF oWnd
ACTIVATE DIALOG oDlg CENTERED NOWAIT
Inkey( 1 )
PAGE
oPrn:CmSay( 10.3 , 15.0, "TEST" )
ENDPAGE
Inkey( 1 )
oDlg:END()
ENDPRINT
MsgInfo( "Print end" )
RETURN Nil
Otto wrote:Ugo,
maybe this thread can help you.
viewtopic.php?f=3&t=14629&p=75810&hilit=preview+mdi#p75810
Otto wrote:Ugo,
if you want the behavior Fivewin had before you must change rpreview.prg and link in the changed one.
Search for MDICHILD and comment it out.
DEFINE WINDOW ::oWnd ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL
//MDICHILD
if !::oDevice:lPrvModal .and. ; // now added
::oWndMain != nil .and. Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
::oDevice := TPrinter():New( cName, .f., .t., nil, .t. ) // last 2 params now added
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 101 guests