1

In the tray, multiple icons appear during the course of the program running. I'm not sure why. I currently have this code:

Public Sub ShowBalloonTip(ByVal Text As String, ByVal Title As String)
    niMain.Visible = False
    niMain.BalloonTipText = Text
    niMain.BalloonTipTitle = Title
    niMain.BalloonTipIcon = ToolTipIcon.Info
    niMain.Visible = True
    niMain.ShowBalloonTip(1000)
End Sub

And when the form is being closed, I set the object to not being visible.

What can I do to solve this?

Semonoir
  • 39
  • 6
  • 1
    You are probably fighting the horrid default instance problem in VB.NET, especially troublesome when you use threads. Add a constructor to the form (Sub New) and set a breakpoint on it so you can see what code creates another instance of the form. – Hans Passant Dec 17 '15 at 14:02
  • Can you show the code you use to display the form? I have a feeling you are somehow creating multiple instances of it. – Bradley Uffner Dec 17 '15 at 14:32
  • @BradleyUffner Ah thank you. That reminds me that to create this form, I made a new object out of it. Dim Form as new frmMain . So I just got rid of this and used direct methods such frmMain.OBJECT or such. – Semonoir Dec 17 '15 at 19:39

0 Answers0