Dear Antonio,
Not run
on tled class I insert on new method
if ! Empty( ::hWnd )
::Create()
::Default()
::AddControl( Self )
else
::DefControl( Self )
endif
IF ::lBlink
DEFINE TIMER ::oTmr INTERVAL ::nInterval ACTION ::Blink() OF self
Endif
on Paint method at the init I Insert
IF ::lBlink
IF !::oTmr=NIL
::=.t.
::Activate()
ENDIF
ENDIF
and this is the blink method
METHOD Blink() CLASS TLED
Local nOpen:= ::nColorLedON
Local nClose:= ::nColorLedOFF
if ::lStatus
::nColorLedON := nClose
else
::nColorLedON := nOpen
endif
::Refresh()
::lStatus := ! ::lStatus
return NIL
I saw when the timer in active the color is before 8388608 and the is nil and it continue
I insert at init on Paint method this line :
::nColorLedON := IIF (::lBlink,::Blink(),::nColorLedON)
It seem to run but the when the lstatus is .f. it not put the right color but NIL
and ::oTmr is allways NIL
Not run
on tled class I insert on new method
if ! Empty( ::hWnd )
::Create()
::Default()
::AddControl( Self )
else
::DefControl( Self )
endif
IF ::lBlink
DEFINE TIMER ::oTmr INTERVAL ::nInterval ACTION ::Blink() OF self
Endif
on Paint method at the init I Insert
IF ::lBlink
IF !::oTmr=NIL
::=.t.
::Activate()
ENDIF
ENDIF
and this is the blink method
METHOD Blink() CLASS TLED
Local nOpen:= ::nColorLedON
Local nClose:= ::nColorLedOFF
if ::lStatus
::nColorLedON := nClose
else
::nColorLedON := nOpen
endif
::Refresh()
::lStatus := ! ::lStatus
return NIL
I saw when the timer in active the color is before 8388608 and the is nil and it continue
I insert at init on Paint method this line :
::nColorLedON := IIF (::lBlink,::Blink(),::nColorLedON)
It seem to run but the when the lstatus is .f. it not put the right color but NIL
and ::oTmr is allways NIL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com