NotifyIcon Balloon Tips

M

Mike

I notice the same issue we had with NotifyIcon Balloon tips under
C/C++ is persistent with the .NET NotifyIcon class.

At issue is, the balloon tip does not work or rather the time to close
does not work under certain OS versions. What happens the tip pops up
but doesn't go away after the time (expires).

Does anyone know if this has been resolved? or some method is used
under .NET?

In my C/C++ code, I used a timer to disable the balloon tip so that it
works the same across all Windows OSes.

So I did the same here, by adding a BallonTipTimer and a countdown
like so:

Public Class Form1

Private BalloonTipTime As Integer = 5 ' seconds

Private Sub Form1_Load( _
ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Load
NotifyIcon1.ShowBalloonTip(BalloonTipIntTime * 1000)
BalloonTipTimer.Start()
End Sub

Private Sub BalloonTipTimer_Tick( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles BalloonTipTimer.Tick

BalloonTipInterval -= 1
If (BalloonTipTime <= 0) Then
BalloonTipTimer.Stop()
NotifyIcon1.Visible = False ' hide icon
NotifyIcon1.Visible = True ' reshow icon without tip
End If
End Sub
End Class

Is there an alternative method under .NET? This is the sort of thing
I was hoping to eliminate by using .NET more.

---
 
T

Thorsten Doerfler

Mike said:
I notice the same issue we had with NotifyIcon Balloon tips under
C/C++ is persistent with the .NET NotifyIcon class.

At issue is, the balloon tip does not work or rather the time to close
does not work under certain OS versions. What happens the tip pops up
but doesn't go away after the time (expires).

This is by design. The ballon go away in the given time if there is an
user present. Detected is this by mouse movement and keyboard input.

NOTIFYICONDATA Structure
http://msdn.microsoft.com/en-us/library/bb773352.aspx

"Remarks
[...]
If the user does not appear to be using the computer, the system does
not count this time towards the timeout."

Thorsten Doerfler
 
T

Thorsten Doerfler

Mike said:
I notice the same issue we had with NotifyIcon Balloon tips under
C/C++ is persistent with the .NET NotifyIcon class.

At issue is, the balloon tip does not work or rather the time to close
does not work under certain OS versions. What happens the tip pops up
but doesn't go away after the time (expires).

This is by design. The ballon go away in the given time if there is an
user present. Detected is this by mouse movement and keyboard input.

NOTIFYICONDATA Structure
http://msdn.microsoft.com/en-us/library/bb773352.aspx

"Remarks
[...]
If the user does not appear to be using the computer, the system does
not count this time towards the timeout."

Thorsten Doerfler
 

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