请问具体怎么操作啊。我对api不熟。我已经试出来了:
在模块下加入:
Declare Function SetFocusAPI& Lib "user32" Alias "SetFocus" (ByVal hwnd As Long)
在窗体的MouseMove事件下加入:
Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
SetFocusAPI ThisDrawing.hwnd
End Sub