TIMER & DIALOG no me funcionan.

Post Reply
User avatar
goosfancito
Posts: 1956
Joined: Fri Oct 07, 2005 7:08 pm

TIMER & DIALOG no me funcionan.

Post by goosfancito »

Estimados,

Ejecuto este código (indico que existe en un .res dialog_1) y no me funciona el timer, si lo hago con un WINDOWS en vez de un DIALOG funciona.

Code: Select all | Expand

#Include "Fivewin.Ch"


FUNCTION Main()

   LOCAL oDlg, oTimer

   DEFINE DIALOG oDlg RESOURCE "DIALOG_1"

   Define Timer oTimer Interval 900 Action MsgInfo("Activado") OF oDlg

      Activate Timer oTimer

   ACTIVATE DIALOG oDlg

   oTimer:End()

RETURN (NIL)
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
Antonio Linares
Site Admin
Posts: 42753
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 110 times
Been thanked: 108 times
Contact:

Post by Antonio Linares »

Gustavo,

El handle del diálogo ha de existir. Así funciona:

Code: Select all | Expand

#Include "Fivewin.Ch" 

static oTimer

FUNCTION Main()

   LOCAL oDlg

   DEFINE DIALOG oDlg

   ACTIVATE DIALOG oDlg ;
      ON INIT BuildTimer( oDlg )

   oTimer:End()

RETURN (NIL)

function BuildTimer( oDlg )

   Define Timer oTimer Interval 900 Action MsgInfo("Activado") OF oDlg

   Activate Timer oTimer
   
return nil   
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply