Private Sub Form_Load()
Text1.MultiLine = True
Text1.Top = 0
Text1.Left = 0
Text1.Width = Me.ScaleWidth
Text1.Height = Me.ScaleHeight
End Sub
Text1.MultiLine = True
Text1.Top = 0
Text1.Left = 0
Text1.Width = Me.ScaleWidth
Text1.Height = Me.ScaleHeight
End Sub
需要设计时设置
Private Sub Form_Load()
Form1.WindowState = 2
Text1.Top = 0
Text1.Left = 0
Text1.Width = Screen.Width
Text1.Height = Screen.Height
End Sub
文本框名为:Text1
工具条名为:Toolbar1
任务栏名为:StatusBar1Text1.MultiLine = True
Text1.Left = 0
Text1.Top = Toolbar1.Height
Text1.Width = Me.ScaleWidth
Text1.Height = Me.ScaleHeight - Toolbar1.Height - StatusBar1.Height即可做到文本框大小为窗体大小,且不覆盖工具条和状态栏
Form1.Left = 0
Form1.Top = 0
Form1.Width = Screen.Width
Form1.Height = Screen.Height
Form1.Width = Screen.Width
Form1.Height = Screen.Height
Text1.Left = 0
Text1.Top = 0
Text1.Width = Form1.Width
Text1.Height = Form1.Height
End Sub