Overclock.net banner

1 - 5 of 5 Posts

·
Premium Member
Joined
·
15,202 Posts
Discussion Starter #1
Anyone want to contribute to my fund of code here?

How do i make a task bar button flash orange? It's supposed to get the user's attention. Can't find a way through the typical hordes of commands in .Net (3.5.)
 

·
Registered
Joined
·
821 Posts
The windows API for that is FlashWindow, although I'm not sure if its baked-into .NET. However, you could always call it via pinvoke.


Edit: This looks like a good howto.
 

·
Registered
Joined
·
1,005 Posts
WinForm

Code:

Code:
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private bool change = true;
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (change == true)
                button1.ForeColor = System.Drawing.Color.Black;
            else
                button1.ForeColor = System.Drawing.Color.Orange;
            change = !change;
        }

        private void button1_Click(object sender, EventArgs e)
        {

        }
    }
}
 
1 - 5 of 5 Posts
Top