Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

NotifyIcon not disappearing after timeout

Posted on 2007-11-14
3
Medium Priority
?
3,420 Views
Last Modified: 2013-11-26
Does anyone know why my Balloon is not disappearing after 5 seconds? Here is my code:

        With Me.NotifyIcon
            .Icon = Me.Icon
            .ShowBalloonTip(5000, "This is the title", "Program is running", ToolTipIcon.Info)
        End With

It does disappear if I click the close button or the bubble itself, but not after the timeout.
I've just started using VB2005.

Thanks.
0
Comment
Question by:JedNebula
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Assisted Solution

by:jpaulino
jpaulino earned 100 total points
ID: 20279404
Hi JedNebula,

Don't know to well but the notifyicon doesn't work for me to. What i have made is to add an additional timer to do the hide. Somehting like this:

Private ToolTipTimer As New Timer
Private nf As NotifyIcon

Sub ToolTipTimerEnd(ByVal sender As System.Object, ByVal e As System.EventArgs)
        nf.Visible = False
        ToolTipTimer.Enabled = False
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

nf = New NotifyIcon
With nf
      .Icon = Me.Icon
      .Visible = True
      .ShowBalloonTip(5000, "This is the title", "Program is running", ToolTipIcon.Info)
End With

With ToolTipTimer
       .Interval = 5000
       .Enabled = True
End With
AddHandler ToolTipTimer.Tick, AddressOf ToolTipTimerEnd

End Sub
0
 
LVL 11

Accepted Solution

by:
TreyH earned 400 total points
ID: 20279439
0
 
LVL 4

Expert Comment

by:justin-clarke
ID: 26599695
@jpaulino nice code to get round this issue.

FYI I would add "nf.Visible = True" to your ToolTipTimerEnd Sub. Which will then stop the notify icon from disappearing, and I would stop the timer first.
Sub ToolTipTimerEnd(ByVal sender As System.Object, ByVal e As System.EventArgs)
        ToolTipTimer.Enabled = False
        nf.Visible = False
        nf.Visible = True
End Sub

Open in new window

0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question