Jump to content
xisto Community
BubbaBeans

Vb2008: Recognize When A Balloontip Is Closed

Recommended Posts

I asked a question earlier concerning creating an alarm in vb6. I converted it over to vb2008 and it is MUCH NICER! Everything minimizes to an icon in the system tray, and sits there using a timer to check for an alarm a couple times a minute. When an alarm is triggered, a balloontip pops up with information in it, and the program takes a public boolean variable, ActiveAlarm, and set is to true. As long as ActiveAlarm is true, the program won't change the information in the balloontip, even if another alarm event occurs.So here's my question: How can I get the program to recognize when the balloontip is closed? Once it is, I will simply have the program set ActiveAlarm to false, and the notifications return to normal. But I can't quite figure out how to recognize the status of the balloontip.

Edited by BubbaBeans (see edit history)

Share this post


Link to post
Share on other sites

I asked a question earlier concerning creating an alarm in vb6. I converted it over to vb2008 and it is MUCH NICER! Everything minimizes to an icon in the system tray, and sits there using a timer to check for an alarm a couple times a minute. When an alarm is triggered, a balloontip pops up with information in it, and the program takes a public boolean variable, ActiveAlarm, and set is to true. As long as ActiveAlarm is true, the program won't change the information in the balloontip, even if another alarm event occurs.

 

So here's my question: How can I get the program to recognize when the balloontip is closed? Once it is, I will simply have the program set ActiveAlarm to false, and the notifications return to normal. But I can't quite figure out how to recognize the status of the balloontip.


Well, it wasn't as difficult as I thought! After doing just a LITTLE digging, the answer presented itself.

 

This code is placed with the form that has the notifyicon (NotifyIcon1) attached

PublicSub BalloonClosed(ByVal sender AsObject, ByVal e As System.EventArgs) Handles NotifyIcon1.BalloonTipClosed

 

****** Code you want to execute when the balloontip is closed, either by using the close button, or it times out

****** Note: You can test to see HOW the balloontip was closed

 

EndSub

 

That's it

 


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.