Simulate blinking of a character

Simulate blinking of a character

Postby Silvio.Falconi » Thu May 23, 2013 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Simulate blinking of a character

Postby ADutheil » 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
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: Simulate blinking of a character

Postby StefanHaupt » Fri May 24, 2013 7:20 am

xHarbour has the function ColorToN (cColor) to convert a clipper color string to a numeric color
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Simulate blinking of a character

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Simulate blinking of a character

Postby Silvio.Falconi » Sat May 25, 2013 6: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Simulate blinking of a character

Postby Antonio Linares » Sat May 25, 2013 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Simulate blinking of a character

Postby Silvio.Falconi » Sat May 25, 2013 7:59 am

see on your mail pls
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Simulate blinking of a character

Postby Antonio Linares » Sat May 25, 2013 9:06 am

Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Simulate blinking of a character

Postby Silvio.Falconi » Sat May 25, 2013 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests