Dim w Dim hPrivate Sub Form_Load() w = Me.Width h = Me.Height End SubPrivate Sub Form_Resize() If Me.Width < 2000 Then Me.Width = 2000 If Me.Height < 2000 Then Me.Height = 2000 If Me.Width > w Then Me.Width = w If Me.Height > h Then Me.Height = h End Sub
Private Sub Timer1_Timer()If Form1.Width <= 3500 Then
Form1.Width = 3500
End If
If Form1.Height <= 3500 Then
Form1.Height = 3500End IfEnd Sub
参考这个贴子 4F :
http://topic.csdn.net/u/20091130/13/854372C1-9435-4B5D-82D9-3CFB0BA9CF94.html
Dim hPrivate Sub Form_Load()
w = Me.Width
h = Me.Height
End SubPrivate Sub Form_Resize()
If Me.Width < 2000 Then Me.Width = 2000
If Me.Height < 2000 Then Me.Height = 2000
If Me.Width > w Then Me.Width = w
If Me.Height > h Then Me.Height = h
End Sub