Luis María Guayán
Tucumán, Argentina
_________________________
http://www.PortalFox.com
Nada corre como un zorro
_________________________
EN un objeto timer – en la método timer tengo esto:
*clear
SET TALK off
Release xIdUsuario
Public xIdUsuario
xLogin = Sys(0)
xPos = At('#',xLogin,1)
xIdUsuario = Alltrim(SubStr(xLogin,1,(xPos-1)))
Set Delete On
Select tMensajeria
Locate For Alltrim(IdUsuario) = xIdUsuario
If .NOT. Found()
Wait Windows Alltrim(IdUsuario)+" No Tiene Ningún Mensaje, Presione el Boton Aceptar" NoWait
Else
**************************************************************************************
*Verifica si tiene mensajes
If !Empty(tMensajeria.Mensaje)
Wait Windows Alltrim(IdUsuario)+" Tiene un Nuevo Mensaje" NoWait
Endif
**************************************************************************************
Endif
Esto me permite verificar si en la tabla de mensajes alguien escribio un mensaje a mi cmputadora.
Pregunta:
Como agregar un Timer en el screen ¿?
JM

Luis María Guayán
Tucumán, Argentina
_________________________
http://www.PortalFox.com
Nada corre como un zorro
_________________________
Buenas Tardes Luis M., gracias por el aporte. Esto fue lo que hice en el programa principal ..
Open database LOCFILE("Datos\Datos1.dbc") share
USE datos\tMensajeria IN 0
WITH _Screen
.AddObject("oTimer","Timer")
.Otimer.Interval = 3000
.otimer.Timer
SET TALK off
xLogin = Sys(0)
xPos = At('#',xLogin,1)
xIdUsuario = Alltrim(SubStr(xLogin,1,(xPos-1)))
Set Delete On
Select tMensajeria
Locate For Alltrim(IdUsuario) = xIdUsuario
If .NOT. Found()
Wait Windows Alltrim(IdUsuario)+" No Tiene Ningún Mensaje, Presione el Boton Aceptar" NoWait
Else
**************************************************************************************
*Verifica si tiene mensajes
If !Empty(tMensajeria.Mensaje)
Wait Windows Alltrim(IdUsuario)+" Tiene un Nuevo Mensaje" NoWait
Endif
Endif
Endwith
No me funciono..
JM
Luis María Guayán
Tucumán, Argentina
_________________________
http://www.PortalFox.com
Nada corre como un zorro
_________________________
Me fui por la primera opcion , definiendo la clase oTimer y coloque el código en el evento timer, en evento init coloque la apertura de la tabla , me esta dando error en la apertura de la tabla
La segunda opción me enrede..
Gracias
Luis Ma.
Funciono..
Cree un una clase timer llamada oTimer
En el evento Timer coloque
***Recupero el area de trabajo.
IF SYS(103) != 'ON'
SET TALK ON
ELSE
SET TALK OFF
ENDIF
IF !USED('tMensajeria')
USE tMensajeria AGAIN SHARED IN 0
ELSE
SELECT tMensajeria
ENDIF
SET TALK off
xLogin = Sys(0)
xPos = At('#',xLogin,1)
xIdUsuario = Alltrim(SubStr(xLogin,1,(xPos-1)))
Set Delete On
Select tMensajeria
Locate For Alltrim(IdUsuario) = xIdUsuario
If .NOT. Found()
* Wait Windows Alltrim(IdUsuario)+" No Tiene Ningún Mensaje, Presione el Boton Aceptar" NoWait
Else
**************************************************************************************
*Verifica si tiene mensajes
If !Empty(tMensajeria.Mensaje)
Wait Windows Alltrim(IdUsuario)+" Tiene un Nuevo Mensaje" NoWait
Endif
Endif
En el programa principal ..
Public MiTimer
MiTimer = CREATEOBJECT("oTimer")
Y listo
Gracias Luis Ma..