我写了一个,不过效果不太好,请高手指点:
Option Explicit
Dim Dn As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Abs(X - Text1.Left - Text1.Width) < 100 And Abs(Y - Text1.Top - Text1.Height) < 100 And Button = vbLeftButton And Dn = False Then
Dn = True
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Abs(X - Text1.Left - Text1.Width) > 100 And Abs(Y - Text1.Top - Text1.Height) > 100 And Dn = False Then
Form1.MousePointer = 0
Else
Form1.MousePointer = 8
End If
If Dn = True Then
Text1.Width = X - Text1.Left
Text1.Height = Y - Text1.Height
Text1.Refresh
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dn = False
End Sub
[此贴子已经被作者于2006-1-13 13:57:25编辑过]