Dear All,
I have one question. Hopely you have the answer about my question. My question is when i minimized my form only show the icon in the taskbar. Do you have solution about my question. Thanks...
Regards
Hiesan
Printable View
Dear All,
I have one question. Hopely you have the answer about my question. My question is when i minimized my form only show the icon in the taskbar. Do you have solution about my question. Thanks...
Regards
Hiesan
Minimizing to the system tray?
vb.net Code:
Private Sub Form1_SizeChanged(ByVal sender As Object, _ ByVal e As EventArgs) Handles Me.SizeChanged If Me.WindowState = FormWindowState.Minimized Then Me.NotifyIcon1.Visible = True Me.ShowInTaskbar = False Else Me.NotifyIcon1.Visible = False Me.ShowInTaskbar = True End If End Sub
Ok thanks so much...............
You would also probably want to handle the DoubleClick event of the NotifyIcon and set the WindowState of the form to Normal. That would cause the SizeChanged event to be raised, thus executing the code to hide the tray icon and reinstate the task bar button.
Cool