Cursor Click?
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
Code: Select all
Structure MOUSEINPUT
Public dx As Integer
Public dy As Integer
Public mouseData As UInteger
Public dwFlags As UInteger
Public time As UInteger
Public dwExtraInfo As IntPtr
End Structure
Structure INPUT
Public type As UInteger ' = 0 already for mouse
Public mi As MOUSEINPUT
End Structure
<DllImport("user32.dll")> Shared Function SendInput(ByVal nInputs As UInteger, ByRef pInputs As INPUT, ByVal cbSize As Integer) As UInteger
End Function
Const MOUSEEVENTF_LEFTDOWN As UInteger = &H2
Const MOUSEEVENTF_LEFTUP As UInteger = &H4
Const MOUSEEVENTF_RIGHTDOWN As UInteger = &H8
Const MOUSEEVENTF_RIGHTUP As UInteger = &H10
Const MOUSEEVENTF_MIDDLEDOWN As UInteger = &H20
Const MOUSEEVENTF_MIDDLEUP As UInteger = &H40
...
Dim inp As INPUT = New INPUT()
Dim size As Integer = Marshal.SizeOf(inp)
inp.mi.dwFlags = MOUSEEVENTF_LEFTDOWN
SendInput(1, inp, size)
inp.mi.dwFlags = MOUSEEVENTF_LEFTUP
SendInput(1, inp, size)
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023