添加一个MDIForm(frmMain)在它上面添加一个PictureBox控件(Picture1),再添加一个标准窗体(form1)
,将form1的属性MDIChild设为True,现在我想,启动时让form1显示再frmMain的picture1控件中(也就是显示在picture1上面),我该怎么做,谢谢指导!

解决方案 »

  1.   

    你可以控制FROM里的TOP 和LEFT,设置在PICTURE里就行了啊
      

  2.   

    设置在picture的什么里面.请具体点.
      

  3.   

    Option ExplicitPrivate Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As LongPrivate Sub Command1_Click()
        Load Form2
        SetParent Form2.hWnd, Form1.Picture1.hWnd     '大概是这样,你自己试试看哈
        Form2.Show
    End Sub
      

  4.   

    申明:如果你说的Form1的属性MDIChild设为True是不能使用下面的例子。Option ExplicitPrivate Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As LongPrivate Sub Command1_Click()
        Dim ret As Long
        Load Form2
        ret = SetParent(Form2.hWnd, Form1.Picture1.hWnd)      '´ó¸ÅÊÇÕâÑù£¬Äã×Ô¼ºÊÔÊÔ¿´¹þ
        Form2.Show
    End Sub
      

  5.   

    恩 我试了将form1的MDIChild设为True,就不行了,那还有其他办法吗?
      

  6.   

    还有我要在MDIForm1中的Picture1中显示form1,而不是在form1的picture中显示form2