home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD1773.psc / modMDIChildMaker.bas < prev    next >
Encoding:
BASIC Source File  |  1999-11-11  |  1.5 KB  |  41 lines

  1. Attribute VB_Name = "modMDIChildMaker"
  2. '-------------------------------------------------------------------------------
  3. ' www.cyberbiz.com - mje@cyberbiz.com - PH: 773-338-3755
  4. '
  5. 'LICENSE:
  6. '--------
  7. ' You have a royalty-free right to use, modify, reproduce and distribute all
  8. ' MDIChildMaker files.
  9. ' By using any portion of MDIChildMaker you agree that CyberBiz, as well as all
  10. ' developers and distributors of MDIChildMaker have no warranty, obligations
  11. ' or liability for any MDIChildMaker related file (code, executable, etc.).
  12. '-------------------------------------------------------------------------------
  13.  
  14. 'Check the README1st.txt file in related documents for information on this application.
  15.  
  16.  
  17. Option Explicit
  18.  
  19. Public Sub CreateMDIChild(frm As Form)
  20.     Dim oMDIChildMaker As MDIChildMaker
  21.     Dim frmNewContainerForm As Form
  22.     Dim frmNewChildForm As Form
  23.     
  24.     '------------------------------------------
  25.     'We MUST instantiate the container form as new to reuse this form as the container
  26.     Set frmNewContainerForm = New frmMDIChildContainer
  27.     'NOTE: here we're referencing a newly instantiated form
  28.     Set frmNewChildForm = frm
  29.     Set frmNewChildForm.MDIContainerForm = frmNewContainerForm
  30.  
  31.     Set oMDIChildMaker = New MDIChildMaker
  32.     Set oMDIChildMaker.ParentForm = frmNewContainerForm
  33.     Set oMDIChildMaker.ChildForm = frmNewChildForm
  34.     
  35.     Set frmNewContainerForm.MDIChildMaker = oMDIChildMaker
  36.     
  37.     oMDIChildMaker.MakeMDIChild
  38.     '------------------------------------------
  39. End Sub
  40.  
  41.