程序控制
from1.left=(MDIform.width-from1.width)/2
from1.top=(MDIIform.height-from1.height)/2

解决方案 »

  1.   

    在Form_Load事件中加入以下语句:from1.left=(MDIform.width-from1.width)/2
    from1.top=(MDIIform.height-from1.height)/2
      

  2.   

    Me.Left = (MDI.Width - Me.Width) / 2
    Me.Top = (MDI.Height - Me.Height) / 2
    程序控制不行,只会位于左上角。
    ???窗体布局窗口无法改变,其选项为灰白不可选。
    ???
      

  3.   

    确保子窗体的midchild属性为true,然后在formload中输入:
    Me.Left = (MDI.Width - Me.Width) / 2
    Me.Top = (MDI.Height - Me.Height) / 2
      

  4.   

    Me.Left = (frmMdi.ScaleWidth - Me.Width) / 2
        Me.Top = (frmMdi.ScaleHeight - Me.Height) / 2