How to insert animated gif in Toolstrip vb.net

Hi!

I want to insert a blinking gif to my Toolstrip in vb.net
Want to display this animated gif, when the system is running email function.

How can i do that ?
LVL 2
team2005Asked:
Who is Participating?
 
R_BroylesCommented:
An even better way to achieve the same end (notifying the user what's going on):
1) Add a label to the toolstrip we'll (call it "EmailLabel" in this example).

2) Set the EmailLabel Visible property to False (so that it is not shown by default)

3) set the text of the label appropriately, and configure the font however you like.

4) Add a timer to the form (we'll call it "BlinkTimer" in this example)

5) Set the Enabled property of BlinkTimer to false (so the label does not blink automatically)
6) Set the Interval property on the timer according to your desired blink rate (note that Interval is in milliseconds. For instance, an Interval of 750 would equal .75 seconds)

7) In the OnTick event of BlinkTimer, add this code:
For VB .Net:
EmailLabel.Visible = Not EmailLabel.Visible

Open in new window

For c#:
EmailLabel.Visible = !EmailLabel.Visible;

Open in new window


8) When you want the label to start blinking, run this code:
For VB .Net:
BlinkTimer.Enabled = True

Open in new window

For c#:
BlinkTimer.Enabled = true;

Open in new window


9) When you want the label to stop blinking, run this code:
For VB.Net:
BlinkTimer.Enabled = False
EmailLabel.Visible = False

Open in new window

For c#:
BlinkTimer.Enabled = false;
EmailLabel.Visible = false;

Open in new window

0
 
MaxOvrdrv2Commented:
1) use the web browser control and drag it onto your form
2) use the little arrow and click on Unlock in parent form option
3) resize it appropriately, and fit it into your toolstrip menu where you want it to show
4) set it to visible=false
5) in the toolstrip menu item code click, set "webbrowser.navigate" to appropriate image ("reportserver.gif" if its in your project folder)
6) set it to visible=true
7) when code ends for sending mail, set it to visible=false

hope this helps
0
 
team2005Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.