Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
VB.NET General Discussion
Mouse Move and Click with Windows API Function SendInput
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="VBobCat, post: 163340, member: 35906"] [b][PLAIN][SOLVED] Re: Mouse Move and Click with Windows API Function SendInput[/PLAIN][/b] Then, again, it was my fault not to see that everything that goes down must come up, and both keyboard keys and mouse buttons must have a pair of press and release messages in order to simulate the user movement. That is, the correct sub MouseLeftClick stays so: [XCODE=vb] Public Shared Sub MouseLeftClick() Dim it As New INPUT it.dwType = INPUT_MOUSE it.mkhi.mi.dwFlags = MOUSEEVENTF_LEFTDOWN SendInput(1, it, Marshal.SizeOf(it)) Application.DoEvents() it = New INPUT it.dwType = INPUT_MOUSE it.mkhi.mi.dwFlags = MOUSEEVENTF_LEFTUP SendInput(1, it, Marshal.SizeOf(it)) End Sub [/XCODE] [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
VB.NET General Discussion
Mouse Move and Click with Windows API Function SendInput
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom