Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Flashing text in buttons


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-14-2008, 05:07 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 60
Default Flashing text in buttons

I need some basic code to make the text in my buttons to flash on and off.
Ex: blue to red and back every second.
Reply With Quote
  #2 (permalink)  
Old 04-14-2008, 06:03 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 262
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Here's a start. I'm sure using one of the libraries you can adjust the Border colours.

Code:
Sub Globals
	'Declare the global variables here.
	flag=0
End Sub

Sub App_Start
	Form1.Show
	button1.FontColor=cred
	timer1.Enabled=true
End Sub


Sub Timer1_Tick
	If flag=0 Then
	button1.FontColor=cblue
	flag=1
	Return
	End If
	If flag=1 Then
	button1.FontColor=cred
	flag=0
	Return
	End If
	

End Sub
__________________
I'm a little crazy at times . . . .

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #3 (permalink)  
Old 04-14-2008, 06:24 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,335
Default

Small modification for developers who like short code:
Code:
Sub Globals
	'Declare the global variables here.
End Sub

Sub App_Start
	Form1.Show
	button1.FontColor=cred
	timer1.Enabled=true
End Sub


Sub Timer1_Tick
	If button1.FontColor = cRed then button1.FontColor = cBlue else button1.FontColor = cRed
End Sub
Reply With Quote
  #4 (permalink)  
Old 04-14-2008, 06:34 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 60
Default

Great

Thanks a lot to all.
Reply With Quote
  #5 (permalink)  
Old 04-14-2008, 06:39 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 262
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Erel View Post
Small modification for developers who like short code:
I hate If ... Else ... 1 liners.
They never work for me
__________________
I'm a little crazy at times . . . .

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #6 (permalink)  
Old 04-14-2008, 07:46 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,463
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by taximania View Post
I hate If ... Else ... 1 liners.
They never work for me
I share your hate my friend.....

Try some yoga before using it, it works for me.....
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #7 (permalink)  
Old 04-14-2008, 08:26 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 262
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Ha ha ha, try some beer .....

Hi Paulo
__________________
I'm a little crazy at times . . . .

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Buttons & FormEXDesktop RandomCoder Questions & Help Needed 5 10-10-2008 12:50 PM
Drag Left / Right buttons on form issue. badkarma Bug Reports 2 04-11-2008 12:50 PM
Image Buttons on menu bar JamesC Questions & Help Needed 4 03-27-2008 10:37 AM
Where are the buttons?? joedoe77 Questions & Help Needed 2 12-24-2007 03:20 PM
forelayer drawing flashing and jumping hung Basic4ppc Wishlist 0 08-22-2007 05:40 AM


All times are GMT. The time now is 06:05 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0