I want to show the form when the option to show is clicked on a systray
icon, but nothing is shown. The only way i can make this shown is to
add Me.Show, however this gives a entirely shrunk window, that now wont
hide again (even with adding Me.Hide)
Could anyone give me the reason for this and help me solve this one :D?
On Load this form is set to :
ShowInTaskbar = False
Me.WindowState = FormWindowState.Minimized
and the systray is also loaded to add controls.
Private Sub MnuShowHide_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MnuShowHide.Click
If Hidden = False Then
ShowInTaskbar = False
Me.WindowState = FormWindowState.Minimized
MnuShowHide.Text = "Show"
Hidden = True
Else
If Hidden = True Then
ShowInTaskbar = True
Me.WindowState = FormWindowState.Normal
MnuShowHide.Text = "Hide"
Hidden = False
End If
End If
End Sub
Peter Ritchie [C# MVP] - 31 Dec 2006 15:46 GMT
If you're looking to create an application that is notification-icon-based,
that may never show a form, you should use the ApplicationContext class with
Application.Run.
Jessica Fosler provides a good example of this at
http://www.windowsforms.net/articles/notifyiconapplications.aspx

Signature
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
> I want to show the form when the option to show is clicked on a systray
> icon, but nothing is shown. The only way i can make this shown is to
[quoted text clipped - 25 lines]
> End If
> End Sub