Kill off the notification balloons?

E

Earl

VS2005 PPc Phone app, WM5, .Net2.0

How do you kill off the notification balloons? I have an asynchronous
message stream that I want to fire notifications whenever a message is
received. What I'm seeing is that if the user "Hides" the balloon, then that
notification is apparently cached by the OS (you can click on the
Notification softkey to pop it back up). While this appears to be a handy
feature, it is beyond unhelpful. Now if the user waits for the duration to
expire, the notification will expire (this is fine). However, what user is
going to resist clicking on Hide when they are done reading? What I've tried
to do is use an HTML button with Close in order to set the Visible property
to false. This does not appear to be the answer (particularly if the form is
already gone!).

This is the Microsoft notification control. Does anyone out there have any
insight?
 
M

Mike

Are you trying to keep the OS from "storing" the notification so that if it
expires or if they click hide it completely goes away and never comes back?

If that is the case, use the BalloonChanged event of the Notification
object. The BalloonChangedEventArgs contains a Visible property that you
can use to determine if you need to dispose of the notification object.

Here is a sample that makes the balloon never show up in the notifications
area and if it expires or the user clicks hide, it goes away:

void notification_BalloonChanged(object sender,
Microsoft.WindowsCE.Forms.BalloonChangedEventArgs e)
{
if (!e.Visible)
{
((Microsoft.WindowsCE.Forms.Notification)sender).Dispose();
}
}
 
E

Earl

Thanks Mike. Actually, I think the underlying issue may be that I am calling
the notification control from the module and when it creates the control
anew, it creates a new thread. Still scratching my head on that one, because
it looks like the control is freezing at that point. I do not dispose of the
splash, merely hide it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top