Advertisement
6_2008-2009 Custom Controls/ Forms/ Menus #196677

Close All MDI Children Simply

This code allows you to close all the MDI child forms in an MDI form at once. Goto http://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:

AI

Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kode Sumber
original-source
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.

Upload
Komentar Asli (3)
Dipulihkan dari Wayback Machine