FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 25.04 and timers
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
FWH 25.04 and timers
Posted: Mon Jun 30, 2025 07:31 PM

Hello,

For more than a week I have been searching for a very strange problem: not one single timer is working anymore.

TImers are tool which I use a lot.

Today I returned back to FWH 25.01, and guess what: all my timers are working again.

What is wrong with the timers in FWH 25.04?

I hope to have some help very urgently.

Thank you very much in advance for any help.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 61
Joined: Wed Jul 26, 2023 12:08 PM
Re: FWH 25.04 and timers
Posted: Mon Jun 30, 2025 08:38 PM

Hello Michel,

I took a quick look. I didn't see any changes between 25/01 and 25/04 that could cause this issue.

I use Harbour and BCC 7.70 with MariaDB. Everythings working fine for me.

Best regards,

Ertan

Best regards,
Ertan,

ertan_ozturk@yahoo.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 25.04 and timers
Posted: Mon Jun 30, 2025 08:51 PM
This is an example of how I use timers:
DEFINE TIMER oTOlCtr INTERVAL 5000 ACTION (MsgInfo("Timer test")))
ACTIVATE TIMER oTOlCt
In FWH 25.01 I got the message every 5 seconds.
In FWH 25.04 I don't get any message.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 61
Joined: Wed Jul 26, 2023 12:08 PM
Re: FWH 25.04 and timers
Posted: Mon Jun 30, 2025 08:56 PM

Hello again,

Are you using mdiframe and mdichild structures?

Can you test with bcc 7.70?

I saw in your sign your BCC version is 7.3

Best regards,

Ertan

Best regards,
Ertan,

ertan_ozturk@yahoo.com
Posts: 61
Joined: Wed Jul 26, 2023 12:08 PM
Re: FWH 25.04 and timers
Posted: Mon Jun 30, 2025 09:26 PM
or check this way

DEFINE TIMER oTOlCtr INTERVAL 5000 ACTION (MsgInfo("Timer test"))) OF GetWndApp()
ACTIVATE TIMER oTOlCtr

and insert this function in your main window's INIT block

ACTIVATE WINDOW oMain ;
ON INIT ( TimerEvent( oTOlCtr:nID ) )
Best regards,
Ertan,

ertan_ozturk@yahoo.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 25.04 and timers
Posted: Mon Jun 30, 2025 09:30 PM

Thank you very much.

I'll try it out tomorrow.

Almost midnight here. Time to go to bed.

Have good night.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 25.04 and timers
Posted: Tue Jul 01, 2025 03:57 AM
Dear Michael,

Timers are working fine here, you can test this example:
#include "FiveWin.ch"

function Main()

    local oWnd 

    DEFINE WINDOW oWnd MDI 

    SET MESSAGE OF oWnd TO "Testing Timers" TIME NOINSET

    ACTIVATE WINDOW oWnd CENTERED 

return nil
The running clock on the bottom right uses a TIMER.

I guess that what you are experiencing may have a different cause. Could you please provide a small PRG that reproduces it ?

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 25.04 and timers
Posted: Tue Jul 01, 2025 07:11 AM
Good morning, Antonio,

Here is the way I define my timers (2) if the settings are set to use them.
PRIVATE CtrAgCtr := .F.
PRIVATE CtrOlCtr := .F.

PRIVATE oTAGCtr, oTOlCTR

.....

DEFINE WINDOW oWnd TITLE "Juda" MENU oMenu
ACTIVATE WINDOW oWnd ON INIT (StartTimer())

.....


STATIC PROCEDURE StartTimer

   IF PAR->CHECKOL .AND. US->UOUTAUTEM

      DEFINE TIMER oTOlCtr INTERVAL 5000 ACTION (oTOlCtr:DeActivate(),ChkOutlook(),oTOlCtr:Activate())
      ACTIVATE TIMER oTOlCtr

      CtrOlCtr := .T.

   ENDIF

   IF !PAR->CHECKAG

      DEFINE TIMER oTAgCtr INTERVAL 10000 ACTION (oTAgCtr:Deactivate(),ChkAgenda(),oTAgCtr:Activate())
      ACTIVATE TIMER oTAgCtr

      CtrAgCtr := .T.

   ELSE

      MsgAlert("The alarm has been switched of.","Take care")

   ENDIF

RETURN


PROCEDURE ChkOutlook

   MsgInfo("Check Outlook OK")

RETURN


PROCEDURE ChkAgenda

   MsgInfo("Check Agenda OK")

RETURN
This way it has always been working since 2000 and until FWH 25.01.
I get one message every 5 seconds, and the other message every 10 sec.

But in FWH 25.04, my timers aren't working at all.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 25.04 and timers
Posted: Tue Jul 01, 2025 10:01 AM
Dear Michel,

Please add these lines to your code just to be sure that the timers get created, thanks:
You should get two MsgInfo()s
STATIC PROCEDURE StartTimer

   IF PAR->CHECKOL .AND. US->UOUTAUTEM

      DEFINE TIMER oTOlCtr INTERVAL 5000 ACTION (oTOlCtr:DeActivate(),ChkOutlook(),oTOlCtr:Activate())
      ACTIVATE TIMER oTOlCtr
      MsgInfo( "First timer created" ) 

      CtrOlCtr := .T.

   ENDIF

   IF !PAR->CHECKAG

      DEFINE TIMER oTAgCtr INTERVAL 10000 ACTION (oTAgCtr:Deactivate(),ChkAgenda(),oTAgCtr:Activate())
      ACTIVATE TIMER oTAgCtr
      MsgInfo( "Second timer created" ) 

      CtrAgCtr := .T.

   ELSE

      MsgAlert("The alarm has been switched of.","Take care")

   ENDIF

RETURN
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: FWH 25.04 and timers
Posted: Tue Jul 01, 2025 02:05 PM
// C:\FWH\SAMPLES\DRIESSEN.PRG

#Include "FiveWin.ch"

STATIC oWnd, oIcon, oTimer1, oTimer2

FUNCTION Main()

   DEFINE ICON oIcon  FILE "..\icons\fivewin.ico"

   DEFINE WINDOW oWnd Title "..:: Driessen Timer " MDI ;
      ICON oIcon

   DEFINE TIMER oTimer2 INTERVAL 60000 ;
      ACTION ( UpdateHeartbeat() ) OF oWnd

   ACTIVATE TIMER oTimer2

   DEFINE TIMER oTimer1 INTERVAL ( 60000 * 2    ) ;
      ACTION ( AUpDateAI() ) OF oWnd

   ACTIVATE TIMER oTimer1

   ACTIVATE WINDOW oWnd CENTERED

   oTimer2:End()
   oTimer1:End()

RETURN NIL

FUNCTION UpdateHeartbeat()

   ? "Driessen 1"

RETURN NIL

FUNCTION AUpDateAI()

   ? "Driessen 2"

RETURN NIL

// FIN / END - kapiabafwh@gmail.com
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 137
Joined: Mon Oct 22, 2012 04:43 PM
Re: FWH 25.04 and timers
Posted: Tue Jul 01, 2025 03:56 PM
Add "OF oWnd" in lines with DEFINE TIMER ... OF oWnd ...
PRIVATE CtrAgCtr := .F.
PRIVATE CtrOlCtr := .F.

PRIVATE oTAGCtr, oTOlCTR

.....

DEFINE WINDOW oWnd TITLE "Juda" MENU oMenu
ACTIVATE WINDOW oWnd ON INIT (StartTimer())

.....


STATIC PROCEDURE StartTimer

   IF PAR->CHECKOL .AND. US->UOUTAUTEM

      DEFINE TIMER oTOlCtr OF oWnd INTERVAL 5000 ACTION (oTOlCtr:DeActivate(),ChkOutlook(),oTOlCtr:Activate())
      ACTIVATE TIMER oTOlCtr

      CtrOlCtr := .T.

   ENDIF

   IF !PAR->CHECKAG

      DEFINE TIMER oTAgCtr OF oWnd INTERVAL 10000 ACTION (oTAgCtr:Deactivate(),ChkAgenda(),oTAgCtr:Activate())
      ACTIVATE TIMER oTAgCtr

      CtrAgCtr := .T.

   ELSE

      MsgAlert("The alarm has been switched of.","Take care")

   ENDIF

RETURN


PROCEDURE ChkOutlook

   MsgInfo("Check Outlook OK")

RETURN


PROCEDURE ChkAgenda

   MsgInfo("Check Agenda OK")

RETURN
Regards



Ing. Anton Lerchster

Continue the discussion