0

Hi,
i"m creating an application involving multiple forms i"ve successfully linked the forms but the problem is when
a new form(form2) is linked by a button control form1 is also running,so i placed the following code in the load event of form2 "form1.close()" this segment of code terminates the entire program when executed. how can i create an application with multiple forms but a single form will be displayed at the moment unless the users enters into a new form....

4
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by @bhi
0

Hi,

Add another MainForm, And make it MDIForm by setting the property (ISMSI=True). Create Menus to show different forms. and In MenuClick, Show the Forms (In Modal)..

Regards
Veena

0

Or you can make sure you have your application setting set to shutdown the application only after all forms close. My guess is that it's set to form1 right now.

0

Another option is you can give-

form1.hide()

in the form load event of form2.

Then is closing event of form2 you can give-

me.Close()
form1.Close()
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.