devxlogo

Hiding MDI Children

Hiding MDI Children

MDI children can be hidden! Although VB doesn’t directly supportthis, you can use the ShowWindow API call to do so. A simple call likethis will do it:

 Declare Function ShowWindow Lib "User" _ (ByVal hWnd As Integer, ByVal nCmdShow _ As Integer) As Integer Global Const SW_HIDE = 0 Ret% = ShowWindow(frmMDIChild.hWnd, SW_HIDE) ,

Other issues need to be addressed if you use this technique, suchas what happens if the active child has a menu when it’s hidden or if thehidden child was maximized. These and other pitfalls are covered in a demonstrationof MDI techniques, MDIDMO.ZIP, which can be downloaded from either theMSBASIC or VBPJ Forums on CompuServe.

devx-admin

Share the Post: