Click here to Skip to main content
15,663,341 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi all,

i have create 7 forms.

problem is ... i want to close form which is open when i click on menu.
LanFanNinja 11-Nov-11 22:06pm    
See my solution below.

1 solution

Well if I understand correctly this may help you.

To close a specific form
Private Sub ExitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End Sub

To close all forms and exit application call

From your main form.

Note: Calling Me.Close() from your main form will usually close all forms including itself and shutdown app as well. If this is not what you want to do you will need to call Me.Hide() on your main form instead.

Does this help?
Share this answer
[no name] 11-Nov-11 22:10pm    
open ms word.
now you can't work in mdi form until you close the save dialog box.
LanFanNinja 11-Nov-11 22:16pm    
Yes if you open a dialog it must be closed before you can work in your main form again. I'm sorry I just don't understand exactly what it is you are asking.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900