'  改变窗口大小
Private Sub Form_Resize()
txtEdit.Top = 500
txtEdit.Height = Me.Height - 1600 - txtEdit.Top
txtEdit.Left = 1000
txtEdit.Width = Me.Width - 300 - txtEdit.Left
End Sub
就这一句
txtEdit.Height = Me.Height - 1600 - txtEdit.Top每当最小化窗体时,就跳出消息框说“实时错误,380,无效属性值。”

解决方案 »

  1.   

    应该是出负值了吧?
    表达式计算出一个负数赋给txtEdit.Height是不行的
      

  2.   

    Private Sub Form_Resize()
        on error resume next
        ...
        ...
    end sub
      

  3.   

    Private Sub Form_Resize()
    if me.WindowState<>1 then'最小化不执行
    txtEdit.Top = 500
    txtEdit.Height = Me.Height - 1600 - txtEdit.Top
    txtEdit.Left = 1000
    txtEdit.Width = Me.Width - 300 - txtEdit.Left
    end if
    End Sub
      

  4.   

    txtEdit.Height = Me.Height - 1600 - txtEdit.Top
    如果得到负的就有错误,你自己想办法避免吧