~Matt~ Posted October 11, 2008 Share Posted October 11, 2008 How do I minimize a window to the system tray and make it re-appear on a right-click? Link to comment https://www.neowin.net/forum/topic/680850-vbnet-system-tray/ Share on other sites More sharing options...
0 James Rose Posted October 11, 2008 Share Posted October 11, 2008 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 Link to comment https://www.neowin.net/forum/topic/680850-vbnet-system-tray/#findComment-589950168 Share on other sites More sharing options...
0 ~Matt~ Posted October 12, 2008 Author Share Posted October 12, 2008 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!!! Link to comment https://www.neowin.net/forum/topic/680850-vbnet-system-tray/#findComment-589952334 Share on other sites More sharing options...
Question
~Matt~
How do I minimize a window to the system tray and make it re-appear on a right-click?
Link to comment
https://www.neowin.net/forum/topic/680850-vbnet-system-tray/Share on other sites
2 answers to this question
Recommended Posts