Why does my hidden form cause my application to exit?

SDittmar

Newcomer
Joined
Feb 9, 2003
Messages
11
Im using a notify icon control and i wanna have the form hidden while the icon is in the tray. I set "me.visible = false" but this causes the showdialog method to end. Is there any way to hide the form without the showdialog method ending?

thanx for any replies
 
Are you using ShowDialog in a Sub Main to show your form? This
sounds like the case, and if it is, you should use Application.Run
to show the form instead. Then you can still hide and show it,
and your program should not exit.

In Sub Main:
Visual Basic:
Dim myForm As New Form1()

Application.Run(myForm)
 
Back
Top