I am writing an application that receives data from an Arduino which is reading a Wii Nunchuk. The data is being received and parsed correctly however when I send the data using MOUSEEVENTF_MOVE, the mouse will only receive data in dx and not dy meaning only movement up and down. I have tried using static values (100, for example) as dy and still no success.
DllImport code:
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto, CallingConvention:=CallingConvention.StdCall)> _
Public Sub mouse_event(dwFlags As Long, dx As Long, dy As Long, dwData As Long, dwExtraInfo As Long)
End Sub
Private Const MOUSEEVENTF_MOVE As Integer = &H1
Code used to move the mouse:
mouse_event(MOUSEEVENTF_MOVE, dx, dy, 0, 0)
Unless the mouse_event sub is laid out wrong, I have no idea what I'm doing wrong.