# Re: 程式码来了

Posted by ㄚ雄 on June 06, 1999 at 21:33:25:

In Reply to: 一个大问题 posted by 北极熊 on June 06, 1999 at 19:56:36:

Option Explicit
Public Cx As Integer
Public Cy As Integer
Public X_flag As Boolean
Public Y_flag As Boolean
Public Q As Integer
Private Sub Form_Load()
Cx = Form1.Width
Cy = Form1.Height
X_flag = False
Y_flag = False
Q = 100 '解析度__可视需要调整
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X >= (Cx - Q) Then
X_flag = True
Else
X_flag = False
End If
If Y >= (Cy - Q) Then
Y_flag = True
Else
Y_flag = False
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X >= (Cx - Q) Then
MousePointer = 9 '东-西向
Else
MousePointer = 0
End If
If Y >= (Cy - Q) Then
MousePointer = 7 '北-南向
Else
If X < (Cx - Q) Then
MousePointer = 0
End If
End If
If X_flag And X > Q Then
Form1.Width = X
Cx = X
End If
If Y_flag And Y > Q Then
Form1.Height = Y
Cy = Y
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
X_flag = False
Y_flag = False
End Sub
由表单属性直接控制我无法做到,但程式码控制的话
可以用上面的方式

Follow Ups: