× Linguagem de Programação ADVPL

Perguntas Timer em String

Mais
7 anos 2 meses atrás #31886 por JamesWesTRP
Timer em String foi criado por JamesWesTRP
Pessoal,

Bom dia td bom ?

Alguem poderia me mandar um exemplo de como fazer uma string com timer ?

Tipo apresenta um texto "Xpto" e depois de 2 segundos eu "limpo" a string...

Obrigado

Por favor Acessar ou Registrar para participar da conversa.

Mais
7 anos 2 meses atrás #31887 por admin
Respondido por admin no tópico Timer em String
MsAguarde({||Inkey(3)}, "", "Atenção Essa Mensagem Irá Fechar Automaticamente em 3 Segs" , .T.)

Por favor Acessar ou Registrar para participar da conversa.

Mais
7 anos 2 meses atrás #31889 por JamesWesTRP
Respondido por JamesWesTRP no tópico Timer em String
então... duro que não seria uma janela de mensagem, seria um componente tSay dentro de uma dialog....

Por favor Acessar ou Registrar para participar da conversa.

Mais
7 anos 2 meses atrás #31890 por admin
Respondido por admin no tópico Timer em String
Acho que te ajuda.

#INCLUDE 'PROTHEUS.CH'
#INCLUDE 'RWMAKE.CH'
#INCLUDE 'FONT.CH'
#INCLUDE 'COLORS.CH'

User Function AGENDALD

Private aCores := {{"EMPTY(SZ4->Z4_STATUS)", 'BR_VERDE'},;        // A SER ATENDIDO
{"SZ4->Z4_STATUS =='Q'" , 'BR_VERMELHO'  },;        // QUENTE
{"SZ4->Z4_STATUS =='S'" , 'BR_PINK'      },;        // SEM PREVISAO
{"SZ4->Z4_STATUS =='M'" , 'BR_CINZA'     },;        // MORNO
{"SZ4->Z4_STATUS =='F'" , 'BR_BRANCO'    },;        // FRIO
{"SZ4->Z4_STATUS =='E'" , 'BR_MARRON'    },;        //  PRODUTO ERRADO
{"SZ4->Z4_STATUS =='H'" , 'DISABLE  '    },;        // FECHADO
{"SZ4->Z4_STATUS =='D'" , 'BR_PRETO'     }}

Private cSayAcum   := Space(17)
Private cSaydia    := Space(2)
Private cSayMes    := Space(17)
SetPrvt("oFont1","oFont2","oDlg1","oSay1","oSay2","oSaydia","oSayAcum","oSayMes","oBtOk","oBtSair","oBrw1","oBtn1")
Public cDia :=""
Public cMes := ""
Public nTimeOut := 15 // Estabelece os segundos PARA REFRESH dos objetos
Public cCadastro := ""

oFont1     := TFont():New( "MS Sans Serif",0,-44,,.T.,0,,700,.F.,.F.,,,,,, )
oFont2     := TFont():New( "MS Sans Serif",0,-25,,.T.,0,,700,.F.,.F.,,,,,, )
oDlg1      := MSDialog():New( 090,232,671,927,"Agenda Diária do Vendedor",,,.F.,,,,,,.T.,,,.T. )
oTimer1:= TTimer():New(nTimeOut*100,{||U_selecdia()},oDlg1) // Ativa timer para pegar a data do calendário
oTimer1:Activate()
oSay1      := TSay():New( 056,016,{||"Abaixo estao as ligações agendadas para HOJE"},oDlg1,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,120,008)
//oSay2      := TSay():New( 072,016,{||"O Valor Acumulado dos Negocios deste Dia é:"},oDlg1,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,116,008)
oSaydia    := TSay():New( 015,053,{||&cDia},oDlg1,,oFont1,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,068,032)
//oSayAcum   := TSay():New( 072,136,{||"oSayAcum"},oDlg1,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,032,008)
oSayMes    := TSay():New( 038,050,{||cMes},oDlg1,,oFont2,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,060,012)
oCalend    := MsCalend():New(12,185,oDlg1,.F.)
nRecno := SZ4->(Recno())
DEFINE SBUTTON FROM 268,150 TYPE 14 ACTION(AxAltera("SZ4",Recno(),4)) ENABLE OF oDLG1
DEFINE SBUTTON FROM 268,200 TYPE 1 ACTION(ODLG1:END()) ENABLE OF oDLG1
DEFINE SBUTTON FROM 268,250 TYPE 2 ACTION(ODLG1:END()) ENABLE OF oDLG1

Public dDiaSel := oCalend:dDiaAtu
cDia := str(Day(dDiaSel,2))
cMes := MesExtenso(dDiaSel)

DbSelectArea("SZ4")
DbSetOrder(1)
Set Filter To SZ4->Z4_RETORNO == dDiaSel .and. SZ4->Z4_STATUS !="F/D/E" .AND. SZ4->Z4_VENDEDOR == USRRETNAME(RETCODUSR())
oBrw1      := MsSelect():New( "SZ4","","",{{"Z4_CODIGO","","CODIGO",""},{"Z4_EMPRESA","","EMPRESA",""},{"Z4_NOME","","NOME",""},{"Z4_TELEF1","","TELEFONE COM",""},{"Z4_CELULAR","","CELULAR",""},{"Z4_EMAIL","","EMAIL",""},{"Z4_RETORNO","","RETORNO",""}},.F.,,{088,016,260,328},,, oDlg1,,aCores )
oDlg1:Activate(,,,.T.)
Return

User Function SelecDia
dDiaSel := oCalend:dDiaAtu
cDia := str(Day(dDiaSel,2))
cMes := MesExtenso(dDiaSel)
oSaydia:Refresh()
oSayMes:Refresh()
oBrw1:oBrowse:Refresh(.T.)
Return (dDiaSel)

Por favor Acessar ou Registrar para participar da conversa.

Mais
7 anos 2 meses atrás #31891 por JamesWesTRP
Respondido por JamesWesTRP no tópico Timer em String
bacana me ajudou mesmo!

obrigado!!

Por favor Acessar ou Registrar para participar da conversa.

Tempo para a criação da página:0.111 segundos
Joomla templates by a4joomla