FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour TIME GET?
Posts: 30
Joined: Mon Oct 30, 2006 02:39 PM
TIME GET?
Posted: Fri Aug 22, 2008 03:00 PM

Desde el momento de poner en un GET, si no entr贸 NANDA para obtener en 30 segundos, la aplicaci贸n desencadenan una acci贸n?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TIME GET?
Posted: Fri Aug 22, 2008 07:40 PM

Eso es lo que quieres hacer 贸 lo que te est谩 ocurriendo ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 30
Joined: Mon Oct 30, 2006 02:39 PM
TIME GET?
Posted: Fri Aug 22, 2008 07:52 PM

Tengo que hacer una pantalla de protecci贸n.
驴Necesito un ejemplo.

Posts: 225
Joined: Tue Feb 28, 2006 04:25 PM
TIME GET?
Posted: Fri Aug 22, 2008 08:04 PM

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

ME INTERESA FW Y XHB POR SER OPEN SOURCE
Posts: 30
Joined: Mon Oct 30, 2006 02:39 PM
TIME GET?
Posted: Fri Aug 22, 2008 08:10 PM

驴Tiene usted alg煤n ejemplo?

Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
TIME GET?
Posted: Fri Aug 22, 2008 09:47 PM

Usa el protectoer de pantalla del windows con una contrase帽a, lo pones en 30 seg.

Salu2

Posts: 30
Joined: Mon Oct 30, 2006 02:39 PM
TIME GET?
Posted: Sat Aug 23, 2008 03:22 AM

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.

http://img148.imageshack.us/my.php?image=safpdvxc3.jpg

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TIME GET?
Posted: Sat Aug 23, 2008 08:56 AM
Aqui tienes un ejemplo funcionando:
#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 nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TIME GET?
Posted: Mon Aug 25, 2008 09:06 AM
Esta versi贸n oculta la barra de tareas y el bot贸n de inicio (en Vista):
function 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
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion