Results 1 to 2 of 2

Thread: Is there a way to trap a form inside of another form?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    7

    Question

    Is there a way to trap one form inside of another...I am making a program that will have the ability to have a few windows inside of the main window...it is a telnet control.

    One window would have say the main terminal screen.
    One window would have say private messages and so on.

    And each window would be able to be resized to the users specification.

    Alan

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Question MDI Application?

    You can create an MDI Application, like this:
    • Create an MDIForm, and two Forms. The forms should have their MDIChild property set to True.
    • In the project properties, change the Startup Object to MDIForm1 or whatever you decided to call it.
    • Put a menu on the MDIForm. The caption would be Window. Make sure you set the menu's WindowList to True (Checked) before you create the menu items.
    • The menu: (Don't notice the quotation marks)
      Item 1: Name = "mnuCreateForm1", Caption = "Create Form1"
      Item 2: Name = "mnuCreateForm2", Caption = "Create Form2"
    Now, the code:

    Code:
    Option Explicit
    
    Private Sub mnuCreateForm1_Click()
        Dim frmNew As Form1
        
        Set frmNew = New Form1
        Call frmNew.Show
    End Sub
    
    Private Sub mnuCreateForm2_Click()
        Dim frmNew As Form2
        
        Set frmNew = New Form2
        Call frmNew.Show
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width