FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Count down timer
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Count down timer
Posted: Tue Jan 13, 2015 08:45 PM

Hello,
Is there somewhere a count down timer with source code.
Thanks in advance
Otto

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Count down timer
Posted: Wed Jan 14, 2015 07:32 AM
Hello,

See samples\testmsg.prg


Code (fw): Select all Collapse
tatic function UpdCaption( oDlg )

   local nFor, nStart

   for nFor := 4 to 0 step -1
       nStart = GetTickCount()
       while ( GetTickCount() - nStart ) < 1000
       end
       oDlg:cMsg := "This message will be destroyed in "+;
                     LTrim( Str( nFor ) ) + " second" + ;
                     If( nFor > 1, "s", "" )
       oDlg:Refresh()
       SysRefresh()
   next

return nil
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.

Continue the discussion