Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Vb2008: Recognize When A Balloontip Is Closed


1 reply to this topic

#1 BubbaBeans

    Newbie [Level 1]

  • Kontributors
  • Pip
  • 11 posts
  • Gender:Male
  • Location:Redding, CA, USA

Posted 21 April 2009 - 06:59 PM

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, 21 April 2009 - 07:00 PM.


#2 BubbaBeans

    Newbie [Level 1]

  • Kontributors
  • Pip
  • 11 posts
  • Gender:Male
  • Location:Redding, CA, USA

Posted 24 April 2009 - 07:22 PM

View PostBubbaBeans, on Apr 21 2009, 11:59 AM, said:

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






Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users