Hello!
How can I move the mouse to different locations in another application. Currently, I used HDC and HWND to get my window's handle. (Also FindWindow). So, is it possible to like MouseMove(HDC, 5,5)?
Printable View
Hello!
How can I move the mouse to different locations in another application. Currently, I used HDC and HWND to get my window's handle. (Also FindWindow). So, is it possible to like MouseMove(HDC, 5,5)?
have a search for these apis:
GetCursorPos Lib "User32.dll"
SetCursorPos Lib "User32.dll"
mouse_event Lib "user32
GetAsyncKeyState Lib "user32"
BY the way, you could find this interesting: a hook for windows and exactly for the mouse:
http://support.microsoft.com/kb/319524
thanks for the info. can you or someone post an example on how to use the above api with a hwnd/hdc.
here is my current code:
It looks possible lol. :) thanks for all the help! :DCode:Dim hWnd As Integer = FindWindow(vbNullString, "Untitled - Notepad")
Dim hDC As IntPtr
SetForegroundWindow(hWnd)
hDC = GetDC(hWnd)
'I would like to move the mouse here. MouseMove(HDC/HWND,X,Y)
anyone xD