Author | Topic: using GUI Dialog in Hybrid mode Solution | |
---|---|---|
AUGE_OHR | using GUI Dialog in Hybrid mode Solution on Wed, 22 Mar 2006 01:39:33 +0100 hi, when using SDI Hybrid ( XbpDialog with Menu and XbpCrt) i allways had problem to use a SDI XbpDialog together with SDI XbpCrt. while my XbpCrt automatic "output to screen" it must have SetAppWindow(oCrt). i try to create "modal" windows, but this does not meen that my window "stop" rest of the application ... now i had a other problem and must use Thread to get a new workspacelist for my DBF. at this point i found a way to "stop" my XbpCrt while running XbpDialog : Procedure Main XbpDialog -> CreateMenu -> XbpCrt Windows ... XbpCrt -> DOmyGUI ... DO WHILE .NOT. lExit nEvent := AppEvent( @mp1, @mp2, @oXbp, 60000 ) 10 min ... ENDDO RETURN ... STATIC isRun := .F. Procedure DomyGUI(oCrt,oDraw,aPos, aSize) LOCAL oThread IF isRUN RETURN ELSE oThread := Thread():new() oThread:start( "ARTRETDLG",oDraw,aPos, aSize) SLEEP(100) DO WHILE isRUN while Thread is "running" SLEEP(100) while "sleep" you will never ENDDO reach Main Event loop SetAppWindow(oCrt) "output" back to oCrt ENDIF RETURN Procedure ARTRETDLG (oDraw,aPos, aSize) isRun := .T. SetAppWindow(oDraw) "output" to GUI ... DO WHILE .NOT. lExit nEvent := AppEvent( @mp1, @mp2, @oXbp, 60000 ) 10 min ... ENDDO isRun := .F. RETURN remember : this is a workaround for SDI only ! you are not able to use "Main / Menu" until isRun = .F. greetings by OHR Jimmy |