Desde el momento de poner en un GET, si no entr贸 NANDA para obtener en 30 segundos, la aplicaci贸n desencadenan una acci贸n?
Desde el momento de poner en un GET, si no entr贸 NANDA para obtener en 30 segundos, la aplicaci贸n desencadenan una acci贸n?
Eso es lo que quieres hacer 贸 lo que te est谩 ocurriendo ?
Tengo que hacer una pantalla de protecci贸n.
驴Necesito un ejemplo.
Ponle un timer que se inicialize con el evento bkeydown del get
de esa manera cuando se digia su contador no llega al limite.
Y si no se hace nada pasado los 30 seg arroje un formulario protector
驴Tiene usted alg煤n ejemplo?
Usa el protectoer de pantalla del windows con una contrase帽a, lo pones en 30 seg.
Salu2
Hola, si quiere utilizar la protecci贸n de las ventanas de la pantalla?, Que ser谩 el FiveWin o xh, no lo est谩 haciendo?
Tengo dentro de mi app, para tener control sobre el cuadro de di谩logo.
#include "FiveWin.ch"
static nTime := 0
function Main()
local oDlg, oSay, oGet, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 0.5, 8 SAY oSay PROMPT "Elapsed time: " + AllTrim( Str( nTime ) ) + " secs."
@ 3, 7 GET oGet VAR cTest PASSWORD
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT BuildTimer( oDlg, oSay, oGet )
return nil
function BuildTimer( oDlg, oSay, oGet )
local oTmr
DEFINE TIMER oTmr OF oDlg ;
ACTION ( nTime++, oSay:Refresh(), If( nTime > 29, ScreenSaver(),)) INTERVAL 1000
ACTIVATE TIMER oTmr
oGet:bKeyDown = { | nKey | nTime := 0, nKey }
return nil
function ScreenSaver()
static oDlg
nTime = 0
if oDlg == nil
DEFINE DIALOG oDlg STYLE WS_VISIBLE COLOR "W/B" SIZE GetSysMetrics( 0 ), GetSysMetrics( 1 )
@ 10, 10 SAY "This is a screensaver" COLOR "W/B"
oDlg:bKeyDown = { || oDlg:End() }
ACTIVATE DIALOG oDlg ;
ON CLICK oDlg:End()
oDlg = nil
nTime = 0
endif
return nilfunction ScreenSaver()
static oDlg
nTime = 0
if oDlg == nil
ShowWindow( FindWindow( "Shell_TrayWnd", "" ), 0 ) // Taskbar
ShowWindow( FindWindow( "Button", "Start" ), 0 ) // Vista round button
DEFINE DIALOG oDlg STYLE WS_VISIBLE COLOR "W/B" SIZE GetSysMetrics( 0 ), GetSysMetrics( 1 )
@ 10, 10 SAY "This is a screensaver" COLOR "W/B"
oDlg:bKeyDown = { || oDlg:End() }
ACTIVATE DIALOG oDlg ;
ON CLICK oDlg:End()
ShowWindow( FindWindow( "Shell_TrayWnd", "" ), 1 )
ShowWindow( FindWindow( "Button", "Start" ), 1 )
oDlg = nil
nTime = 0
endif
return nil