我用了mccad的- Dim i As Boolean
- Private Sub CommandButton1_Click()
- Me.Hide
- End Sub Private Sub UserForm_Initialize()
- i = True
- End Sub
- Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
- 'Debug.Print X & "," & Y
- If (X < 5 Or Y < 5 Or X > Me.Width - 15 Or Y > Me.Height - 25) Then
- If i = True Then
- i = False
- Me.StartUpPosition = 3
- Me.Hide
- Me.Show 0
- End If
- Else
- If i = False Then
- i = True
- Me.StartUpPosition = 3
- Me.Hide
- Me.Show 1
- End If
- End If
- End Sub
但是出现下面错误:
file:///d:/1.bmp
|