Solved

Help with creating notification control

Posted on 2015-02-11
2
61 Views
Last Modified: 2015-02-12
Hi,

How do you create a blinking control to let the user know the application is processing using VB.NET?

Thanks,

Victor
0
Comment
Question by:vcharles
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 40604968
You work with a Timer.

Drag a Timer from the Toolbox to your form. It will appear in a bar at the bottom of your form.

Click on the Timer and set its Interval property to the delay that you want for you flashing. The Interval is in milliseconds, so 500 would give you half a second.

Double click on your timer to go into its Tick event, and add code such as the following. The Control can be anything, I sometimes use a Label with some meaningful text such as "Wait, I work..." :-) Add code like the following to switch the color:

	Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
		If Label1.BackColor = SystemColors.Control Then
			Label1.BackColor = Color.Red
		Else
			Label1.BackColor = SystemColors.Control
		End If
	End Sub

Open in new window


When you want your control to Flash, simply call the Start method on your Timer. The Stop method to stop it. If you do not hide the control between calls, make sure to set its BackColor to Control after the Stop, to make sure that it does not stay highlighted.
0
 

Author Closing Comment

by:vcharles
ID: 40606229
Thank You!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now