FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Simulate blinking of a character
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Simulate blinking of a character

Posted: Thu May 23, 2013 09:23 PM

How I can Make to have a simulation of Old clipper colors : sample W*

I thinked to use a times but it not run well

DEFINE TIMER ::oTimer INTERVAL 50 ACTION (::nClrLedON := ::nClrLedOFF ) of ::oWnd

ACTIVATE TIMER ::oTimer

I wish change the color after n seconds no stop

Any help please ?

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
Posts: 368
Joined: Sun May 31, 2009 06:25 PM

Re: Simulate blinking of a character

Posted: Thu May 23, 2013 11:20 PM

I don´t know if it´s possible with FW but you could try to use animated gif image.

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM

Re: Simulate blinking of a character

Posted: Fri May 24, 2013 07:20 AM
xHarbour has the function ColorToN (cColor) to convert a clipper color string to a numeric color
kind regards

Stefan
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Simulate blinking of a character

Posted: Fri May 24, 2013 10:42 AM

Silvio,

FWH support Clipper colors format by default :-)

Do you want to change the colors of the chars or to hide and show the chars ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Simulate blinking of a character

Posted: Sat May 25, 2013 06:47 AM

Antonio,
I need it for the class I 'm tring to create
I need to create a Timer to change a color after n seconds
Sample : the user set the timer to 25 secs and th eobject change the color in intermittently as christmas lights
How I can make it ?

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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Simulate blinking of a character

Posted: Sat May 25, 2013 07:23 AM

Silvio,

Unless you show us how you are painting, its difficult to help you without it

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Simulate blinking of a character

Posted: Sat May 25, 2013 07:59 AM

see on your mail pls

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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Simulate blinking of a character

Posted: Sat May 25, 2013 09:06 AM
Code (fw): Select all Collapse
#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()

   local oTmr, oSay, oFnt

   DEFINE FONT oFnt NAME "Verdana" SIZE 0, -30

   DEFINE WINDOW oWnd TITLE "Silvio"

   @ 2, 2 SAY oSay PROMPT "Hello world" COLOR "GR+/W*" FONT oFnt SIZE 200, 50

   DEFINE TIMER oTmr INTERVAL 700 ACTION ChangeColor( oSay ) OF oWnd

   ACTIVATE TIMER oTmr

   ACTIVATE WINDOW oWnd 
   
   oFnt:End()

return nil

//----------------------------------------------------------------------------//

function ChangeColor( oSay )

   static lStatus := .F.
   
   if lStatus
      oSay:SetColor( "GR+/W*" )
   else   
      oSay:SetColor( "R+/W*" )
   endif

   oSay:Refresh()
   lStatus = ! lStatus

return nil

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Simulate blinking of a character

Posted: Sat May 25, 2013 09:42 AM

thanks, nice it's that I wish

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

Continue the discussion