我想找到一个容器控件,这个控件可以放置一个别的窗体,不知道有无此控件?谢谢了

解决方案 »

  1.   

    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As LongPrivate Sub Form_Load()
    Form2.Show
    SetParent Form2.hWnd, Me.Picture1.hWndEnd Sub
      

  2.   

    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Const SW_SHOWMAXIMIZED = 3Private Sub Form_Load()
    Form2.Show
    SetParent Form2.hwnd, Me.Picture1.hwnd
    ShowWindow Form2.hwnd, SW_SHOWMAXIMIZED
    End Sub
      

  3.   

    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    窗体中放置两个PictureBox,另新增窗体Form2,Form3,在Form1中加入下面代码
    Private Sub Form_Load()
    SetParent Form2.hWnd, Picture1.hWnd
    Form2.ShowSetParent Form3.hWnd, Picture2.hWnd
    Form3.ShowSetParent Form4.hWnd, Picture3.hWnd
    Form4.Show
    End Sub