VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Close All MDI Children Simply

by VBGreatone (http://www.vbg1.com) (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (41 Votes)

This code allows you to close all the MDI child forms in an MDI form at once.
Goto https://www.vbgreatone.com/ to learn like you've never learned before. Get over 500 api functions with example for each, and tips like this and, much much more. Just visit it, i'm sure you will like it.
First, create a menu item in the MDI form name mnuCloseAll, then paste in this code:

Rate Close All MDI Children Simply

Private Sub mnuCloseAll_Click()
 Screen.MousePointer = vbHourglass
 Do While Not (Me.ActiveForm Is Nothing) 
  Unload Me.ActiveForm 
 Loop 
 Screen.MousePointer = vbDefault 
End Sub
'Once the user clicks on that menu item, the MDI child forms will close.

Download this snippet    Add to My Saved Code

Close All MDI Children Simply Comments

No comments have been posted about Close All MDI Children Simply. Why not be the first to post a comment about Close All MDI Children Simply.

Post your comment

Subject:
Message:
0/1000 characters