VB FORMS DISPALY
-
-
Dear All, I have simple project,has many forms.I just need to close all other forms if they active(Ex:Need to close Sales Form automatically When Clicking Invoice Form).I am not using MDI Forms.I just need an idea about Code How to implement this.
In visual studio 2008 if you use the "application framework" you can choose the "shutdown mode" in the project properties. (maybe in older versions of visual studio too, i did not check it) Project -> Properties -> Application -> Shutdown mode If you want to write a statement that closes your application you can use
System.Windows.Forms.Application.Exit()
I think the "End" keyword still works too in a VB.Net application
It feels good to learn and achieve
-
In visual studio 2008 if you use the "application framework" you can choose the "shutdown mode" in the project properties. (maybe in older versions of visual studio too, i did not check it) Project -> Properties -> Application -> Shutdown mode If you want to write a statement that closes your application you can use
System.Windows.Forms.Application.Exit()
I think the "End" keyword still works too in a VB.Net application
It feels good to learn and achieve
thanks for reply.you code for Exit the application.But i need a form close automatically while we clicking for another form. Example I am working with Sales form and Also clicked for Invoice form.So we have two forms already opened state.I just need Sales form Close itself when i click for another form.in Clearly I need only two forms(Parent form and one child form)active at time. hope your reply
-
thanks for reply.you code for Exit the application.But i need a form close automatically while we clicking for another form. Example I am working with Sales form and Also clicked for Invoice form.So we have two forms already opened state.I just need Sales form Close itself when i click for another form.in Clearly I need only two forms(Parent form and one child form)active at time. hope your reply
There is no built-in support for this. You can make your own based on Application.OpenForms; enumerate all open forms and close the ones you don't want (e.g. main form, and this form) :)
-
There is no built-in support for this. You can make your own based on Application.OpenForms; enumerate all open forms and close the ones you don't want (e.g. main form, and this form) :)