• 0

VB.net :: System tray


Question

2 answers to this question

Recommended Posts

  • 0
How do I minimize a window to the system tray and make it re-appear on a right-click?

When the user minimizes the form set it to

Me.Visible = False

You will then need to use a NotifyIcon control to display an icon in the tray.

Then in the MouseDown event of the NotifyIcon control use the following

If e.Button = Windows.Forms.MouseButtons.Right Then

Me.Visible = True

Me.WindowState = FormWindowState.Normal

End If

  • 0
When the user minimizes the form set it to

Me.Visible = False

You will then need to use a NotifyIcon control to display an icon in the tray.

Then in the MouseDown event of the NotifyIcon control use the following

If e.Button = Windows.Forms.MouseButtons.Right Then

Me.Visible = True

Me.WindowState = FormWindowState.Normal

End If

Great!!!! It works!!! thanx heaps!!!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.