Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call dy(CSng(X), CSng(Y))
End Sub
Sub dy(x1 As Single, y1 As Single)
With Me.CommandButton1
If x1 > 8 And x1 < .Width - 15 And y1 > 8 And y1 < .Height - 15 Then
.Caption = "谢谢"
Else
.Caption = "你好"
End If
End With
End Sub
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call dy(CSng(X), CSng(Y))
End Sub
Sub dy(x1 As Single, y1 As Single)
With Me.CommandButton1
If x1 > 8 And x1 < .Width - 15 And y1 > 8 And y1 < .Height - 15 Then
.Caption = "谢谢"
Else
.Caption = "你好"
End If
End With
End Sub