[StructLayout(LayoutKind.Explicit)]
public struct INPUT_RECORD
{
[FieldOffset(0)]
public ushort EventType;
[FieldOffset(4)]
public KEY_EVENT_RECORD KeyEvent;
[FieldOffset(4)]
public MOUSE_EVENT_RECORD MouseEvent;
[FieldOffset(4)]
public WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
[FieldOffset(4)]
public MENU_EVENT_RECORD MenuEvent;
[FieldOffset(4)]
public FOCUS_EVENT_RECORD FocusEvent;
};
<StructLayout(LayoutKind.Explicit)> _
Public Structure INPUT_RECORD
<FieldOffset(0)> Public EventType As System.UInt16
<FieldOffset(4)> Public KeyEvent As KEY_EVENT_RECORD
<FieldOffset(4)> Public MouseEvent As MOUSE_EVENT_RECORD
<FieldOffset(4)> Public WindowBufferSizeEvent As WINDOW_BUFFER_SIZE_RECORD
<FieldOffset(4)> Public MenuEvent As MENU_EVENT_RECORD
<FieldOffset(4)> Public FocusEvent As FOCUS_EVENT_RECORD
End Structure
Defined in wincon.h