gibaf Posted March 27, 2015 Report Share Posted March 27, 2015 ola a todos tem como a rotina q esta sendo executada no MsgRun() ir alterando a mensagem q fica aparecendo (cCaption) ??? Nesse caso exclusivamente, tenho q usar o MsgRun(), e nao pode ser pela classe TProgress() ou ainda pela classe TMeter() Desde ja agradeco a ajuda: MUITO OBRIGADO !!!! Quote Link to comment Share on other sites More sharing options...
MatheusFarias Posted March 27, 2015 Report Share Posted March 27, 2015 MsgRun('Aguarde, processando informações...','Aguarde...',{|oDlg| testefuncao(oDlg)}) ---------------- function teste(oDlg) oDlg:cMsg:="Alterando texto...." oDlg:Refresh() Theotokos and betovsp 2 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 27, 2015 Report Share Posted March 27, 2015 Uma idéia: #Include "FiveWin.Ch" STATIC oDlg //----------------------------------------------------------------------------// Function WaitSeconds( nSecs ) LOCAL nFor, nStart // Local nStart := GetTickCount() DEFAULT nSecs := 5 //1 /* While GetTickCount() - nStart < ( 1000 * nSecs ) Enddo */ FOR nFor = 4 to 0 step -1 nStart = GetTickCount() //while ( GetTickCount() - nStart ) < 1000 While GetTickCount() - nStart < ( 1000 * nSecs ) enddo oDlg:cMsg := "Trocando o CAPTION do MsgRun do FiveWin " + ; LTrim( Str( nFor ) ) + " Segundo" + ; If( nFor > 1, "s", "" ) oDlg:Refresh() SysRefresh() NEXT Return Nil //---------------------------------------------------------------------------// Function MsgRun( cCaption, cTitle, bAction ) //Local oDlg, nWidth, oFnt, oFont, oBrush Local nWidth, oFnt, oFont, oBrush DEFAULT cCaption := "Por Favor, Espere... ",; bAction := { || WaitSeconds( 1 ) } DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 0, -12 BOLD DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -14 BOLD IF cTitle == Nil DEFINE DIALOG oDlg ; FROM 0,0 TO 3, Len( cCaption ) + 4 ; STYLE nOr( DS_MODALFRAME, WS_POPUP ) ; COLOR nRGB( 000, 000, 000 ), nRGB( 135, 206, 235 ) oDlg:lHelpIcon := .F. // ok ELSE DEFINE DIALOG oDlg ; FROM 0,0 TO 4, Max( Len( cCaption ), Len( cTitle ) ) + 4 ; TITLE cTitle ; STYLE nOR( DS_MODALFRAME ) ; COLOR nRGB( 000, 000, 000 ), nRGB( 135, 206, 235 ) oDlg:lHelpIcon := .F. // ok ENDIF oDlg:bKeyDown = { | nKey | IF( nKey == VK_ESCAPE, ( oDlg:End() ), ) } oDlg:bStart := { || Eval( bAction, oDlg ), oDlg:End(), SysRefresh() } oDlg:cMsg := cCaption nWidth := oDlg:nRight - oDlg:nLeft SET FONT OF oDlg TO oFnt //-> Modificado By Antonio Linares 26/10/2007 - Correcao de Bug ACTIVATE DIALOG oDlg CENTERED ; ON PAINT oDlg:Say( 11, 0, xPadC( oDlg:cMsg, nWidth ),,,, .T. ) oFnt:End() oFont:End() RETURN NIL //---------------------------------------------------------------------------// Function MsgWait( cCaption, cTitle, nSeconds ) DEFAULT nSeconds := 4 Return MsgRun( cCaption, cTitle, { || WaitSeconds( nSeconds ) } ) //---------------------------------------------------------------------------// Function StopUntil( bBlock ) DO WHILE !Eval( bBlock ) WaitMessage() SysRefresh() ENDDO Return Nil //---------------------------------------------------------------------------// Quote Link to comment Share on other sites More sharing options...
gibaf Posted March 27, 2015 Author Report Share Posted March 27, 2015 MsgRun('Aguarde, processando informações...','Aguarde...',{|oDlg| testefuncao(oDlg)}) ---------------- function teste(oDlg) oDlg:cMsg:="Alterando texto...." oDlg:Refresh() falow... muito obrigado !!! isso mesmo ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.