Mouse emulation

Mouse emulation [Archive] – VBForums

Hack
Dec 11th, 2001, 06:23 AM
Take a look at this link.

http://www.allapi.net/apilist/apifunction.php?apifunction=mouse_event

Incendently, I can find nothing on MouseEventEx, so play around with MouseEvent and see what that does for you.


AlbafaN
Dec 11th, 2001, 01:14 PM
you’ll wanna use the SendMessage API with the WM_LBUTTONDOWN and WM_LBUTTONUP constants….

—-
Public Declare Function SendMessage Lib “user32″ Alias “SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
—-

SendMessage hWnd&, WM_LBUTTONDOWN, 0&, 0&
SendMessage hWnd&, WM_LBUTTONUP, 0&, 0&

…. but before you do this, you need to get the handle (hWnd) of the window the mouse is over (the button, or whatever). If you dont know how to do this, lemme know…

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

What is 10 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)