Page 1 of 1

How to use TMeter on SET MESSAGE Down window

Posted: Fri May 13, 2016 6:59 pm
by HATHAL
welcome everybody .
I want to help .
How to use TMeter on SET MESSAGE Down window
Thank.
hathal

Re: How to use TMeter on SET MESSAGE Down window

Posted: Sat May 14, 2016 11:47 am
by armando.lagunas
hello

Code: Select all


#include "fivewin.ch"

#define GWL_STYLE          (-16)


FUNCTION Main()

   LOCAL oWnd, oMeter, oTimer
   
   DEFINE WINDOW oWnd
    
   SET MESSAGE OF oWnd TO "Testing" 2007
   
   @ 04, oWnd:oMsgBar:nWidth-111 PROGRESS oMeter POSITION 1 of oWnd:oMsgBar SIZE 94,18 pixel   

   oMeter:SetRange( 0, 100 ) 
   
   DEFINE TIMER oTimer INTERVAL 5 ACTION SetPosProg( oMeter, oTimer ) OF oWnd

   SetWindowLong( oWnd:oMsgBar:hWnd, GWL_STYLE, nOr( GetWindowLong( oWnd:oMsgBar:hWnd, GWL_STYLE ), WS_CLIPCHILDREN ) )
 
   ACTIVATE WINDOW oWnd;
            ON INIT oTimer:Activate()
   
RETURN NIL

FUNCTION SetPosProg( oMeter, oTimer )

   oMeter:SetPos( oMeter:nPos + 1 )
   IF oMeter:GetPos() > 100
      oTimer:End()
   ENDIF
   
RETURN NIL

 

Re: How to use TMeter on SET MESSAGE Down window

Posted: Sat May 14, 2016 12:45 pm
by HATHAL
Thanks for the engineer.
armando.bagunas
This was required.
Million greeting.
Hathal