Jump to content
Fivewin Brasil

mostrar Dialog por tempo determinado


EDUTEK

Recommended Posts

Bom Dia!

Como faço para mostrar uma dialogo por n tempo num xbrowse?

eu já uso o DEFINE TIMER 

mas como que eu faço para a dialog ficar visível e depois de "n" tempo fechar automaticamente, sem ação do usuário.

pois será um painel tipo aeroporto, o xbrowse ele já atualiza, tenho 2 xbrowse ( Veiculos em manutenção e Veiculos Liberados)

eu gostaria de mostrar quando um veiculo fosse liberado, mostrar um dialogo por alguns segundos com os ultimos veiculos liberados e depois fechar automaticamente.

 

alguém sabe como faço isso ?

 

 

 

Link to comment
Share on other sites

tenho 2 xbrowse nque mostra 

1 - veiculos em manutencao e 2 - veiculos liberados

usando o define timer

DEFINE TIMER oTimer2 INTERVAL 20000 ACTION {syslog_os_painel_mostra(),oDlg:SetFocus(),oSay2:refresh(),oSay3:refresh(),oBrw:refresh(),oBrw2:refresh()  }  OF oDlg
 

executo um dialogo que mostra os 3 últimos veículos liberados.

eu queria mostrar o Dialogo por 20 segundo e fechar automaticamente. pois não vai ter interferência de usuário, é uma tela que fica na sala dos motoristas.

 

 

 

 

 

 

 

Link to comment
Share on other sites

FUNCTION...
	   MsgRun( "Desligando o Programa...           ", ;
           "Por Favor, Espere!                 ", ;
           { | oDlg | ( DESLIGA_PROG( oDlg ) ) } )
	   LIBERA_TUDO()
	RETURN NIL
//-> Mostra o Desligamento do Programa
FUNCTION DESLIGA_PROG_NFE( oDlg )
	   LOCAL nFor, nStart
	   FOR nFor := 4 to 0 step -1
	       nStart = GetTickCount()
	       while ( GetTickCount() - nStart ) < 1000
       end
	       oDlg:cMsg := "Aguarde, Desligando o Programa em: "+ ;
                     LTrim( Str( nFor ) ) + " Segundo"   + ;
                     If( nFor > 1, "s", "" )
	       oDlg:Refresh()
       SysRefresh()
	   NEXT
	RETURN NIL
	FUNCTION LIBERA_TUDO()
	   FreeResources()
   SysRefresh()
   DbCloseAll()
   RELEASE All
   Hb_GCAll( .T. )
   CLEAR MEMORY
   PostQuitMessage( 0 )
   __QUIT()
	RETURN NIL


Link to comment
Share on other sites

#include "FiveWin.ch"

function Main()
   local oDlg, cTest := "Hello world!   "
   DEFINE DIALOG oDlg TITLE "I am a DialogBox" COLOR "W+/B"
   
   @ 1, 3 GET cTest

   @ 3, 5 BUTTON "&Teste" SIZE 40, 12 ;
          ACTION test() DEFAULT

   @ 3, 16 BUTTON "&Sair" SIZE 40, 12 ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED ;
            VALID MsgYesNo( "Do you want to end ?" )

return nil

function Test()
   local oDlg, cTest := "Teste nowiant   "

   DEFINE DIALOG oDlg TITLE "Teste 2" COLOR "W+/gr"
   @ 1, 3 say cTest OF oDlg COLOR ("N/W")
   ACTIVATE DIALOG oDlg CENTERED NOWAIT
   SYSWAIT(2)
   oDlg:END()
return nil
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...