English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Im currently working on a project in VB.Net and Im doing great so far however Ive got stuck. I have 4 forms in total in my application, two of which are the main ones. They are both using notifyicons and I ran into a problem as I got copies of the icons every time I switched so I fixed this using:

Dim form1 As Form1
form1 = New Form1()
form1.Show()
Me.Close()

However I tried to use this on my first form (1):

Dim form3 As Form3
form3 = New Form3()
form3.Show()
Me.Close()

But whenever I clicked to go to form 3 it closes the whole application. So does anyone know of a way round this?
Please give code or relevant link.
Thank You!

2007-02-04 03:22:25 · 1 answers · asked by sbraidley 3 in Computers & Internet Programming & Design

1 answers

In the Solution Explorer, double-click "My Project" under the application. In the "Application" tab of the dilaog box that comes up, select "When last form closes" from the "Shutdown Mode" combo box. That way, the application won't shut down until ALL of the forms are closed, not just the one used to start the application (which, in your case, is Form1).

2007-02-04 06:39:42 · answer #1 · answered by Gene 3 · 0 0

fedest.com, questions and answers