If you placed the codes in the form, then make sure you place the word "PRIVATE" infront of the API. Like this:
Drop a command button on the form and place these codes into the form too.Code:Private Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Code:Private Sub Command1_Click SetCursorPos 100, 100 End Sub




Reply With Quote