Results 1 to 5 of 5

Thread: Qestion on Subform in VB?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    13
    Any way to launch a subform in VB. I am looking for a simple way to held several subforms in a VB form according to user's choice. Any control to held these subforms?
    Thx

  2. #2
    Guest
    SubForms?? Do you mean Child Forms? If so, use the SetParent API, or simply use an MDIForm instead.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    13
    Suppose I have a treeview box on a form. I would like to load different forms beside the treeview control based on the node position in the tree. I am looking for a container for these "subforms". Any suggestion?

  4. #4
    Guest
    Use a PictureBox.
    Code:
    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    
    Private Sub Form_Load()
        Form2.Show
        SetParent Form2.hWnd, Picture1.hWnd
    End Sub

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    13
    Thx

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