Pulsating BackColor of button?

  • Thread starter Thread starter Try Guy
  • Start date Start date
T

Try Guy

I would like the background of a button so pulsate between to given colors
with the speed of a given timeinterval... I have two questions:

What can I use to control the interval thing with? I guess a Timer.. maybe?
is this fast enough to use as a mouseover effect on a Button?

How do I go from one color to another? Is there any built in functions for
these things or do I have to figure this out myself?

regards
/Try Guy
 
Create a custom control, drag a button onto the designer view and a timer,
use the timer to alter the BackColor.

HTH

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
I have done it.. and it works fine.. until you want to use the XP look of
the buttons.. then my code is about useless it feels..

What do I need to do to make my Custom Button work with the XP style?

The only things I have really changed in my button is the backcolor of it,
in the MouseEnter and MouseLeave events..

/Try Guy
 
In the first lines of your Sub Main

Application.EnableVisualStyles()
Dim f as New Form1
f.ShowDialog()



Then ensure your button FlatStyle property is set to System

That should do it.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Hi,

http://www.thecodeproject.com/vb/net/leadit_flatbutton_control.asp

Ken
---------------------
I have done it.. and it works fine.. until you want to use the XP look of
the buttons.. then my code is about useless it feels..

What do I need to do to make my Custom Button work with the XP style?

The only things I have really changed in my button is the backcolor of it,
in the MouseEnter and MouseLeave events..

/Try Guy
 
I don't have a Sub Main.. what's that and where should that be? I feel I'm
seriously not knowing something I should here...

/Try Guy
 
I can get my button to look like an XP style button, not a problem.. (using
Manifest file) it's just that my Custumizing does'nt work then... the
fading backcolor of the button.

My costumizing of the button makes the button fade to another color when you
hover over it, and then goes back to backcolor when you leave it.. that only
works when I have a oldstyle look... it's like if my code doesn't work when
i use the XP style on the button..

/Try Guy
 
In your project properties, you can optionally set the project to run a Sub
Main, which you can put in a module file. This then executes instead of the
form being launched. In acual fact this is what happens anyway, when you
specify a Sub Main, you are simply creating your own home grown Sub Main.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top