Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.54 KB | None | 0 0
  1. Private Sub DoMouse(ByVal flags As MOUSEEVENTF, ByVal newPoint As Point)
  2.  
  3. Dim input AsNew Input
  4. Dim mi AsNew MOUSEINPUT
  5. input.dwType = InputType.Mouse
  6. input.mi = mi
  7. input.mi.dwExtraInfo = IntPtr.Zero
  8. input.mi.dx = CInt(newPoint.X * (65535 / Screen.PrimaryScreen.Bounds.Width))
  9. input.mi.dy = CInt(newPoint.Y * (65535 / Screen.PrimaryScreen.Bounds.Height))
  10. input.mi.time = 0
  11. input.mi.mouseData = 0
  12. input.mi.dwFlags = flags
  13.  
  14. Dim cbSize As Integer = Marshal.SizeOf(GetType(Input))
  15. Dim result As Integer = SendInput(1, input, cbSize)
  16.  
  17. EndSub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement