Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub DoMouse(ByVal flags As MOUSEEVENTF, ByVal newPoint As Point)
- Dim input AsNew Input
- Dim mi AsNew MOUSEINPUT
- input.dwType = InputType.Mouse
- input.mi = mi
- input.mi.dwExtraInfo = IntPtr.Zero
- input.mi.dx = CInt(newPoint.X * (65535 / Screen.PrimaryScreen.Bounds.Width))
- input.mi.dy = CInt(newPoint.Y * (65535 / Screen.PrimaryScreen.Bounds.Height))
- input.mi.time = 0
- input.mi.mouseData = 0
- input.mi.dwFlags = flags
- Dim cbSize As Integer = Marshal.SizeOf(GetType(Input))
- Dim result As Integer = SendInput(1, input, cbSize)
- EndSub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement