[StructLayout( LayoutKind.Explicit )]
public struct MOUSE_EVENT_RECORD
{
[FieldOffset( 0 )]
public COORD dwMousePosition;
[FieldOffset( 4 )]
public uint dwButtonState;
[FieldOffset( 8 )]
public uint dwControlKeyState;
[FieldOffset( 12 )]
public uint dwEventFlags;
}
<StructLayout(LayoutKind.Explicit)> _
Public Structure MOUSE_EVENT_RECORD
<FieldOffset(0)> Public dwMousePosition As COORD
<FieldOffset(4)> Public dwButtonState As UInteger
<FieldOffset(8)> Public dwControlKeyState As UInteger
<FieldOffset(12)> Public dwEventFlags As UInteger
End Structure
None.
UPDATE:
This started working once I changed the FOCUS_EVENT_RECORD to take a uint rather than a bool. Prior to that MOUSE_EVENT_RECORD.dwMousePosition.X was always 0