public PostMessage ( int msg, |
||
msg | int | |
wParam | ||
lParam | ||
리턴 | void |
static void Main() { using (MessageThread thread = new MessageThread()) { const int WM_COMMAND = 0x111; thread.MessageHandlers[WM_COMMAND] = (m) => { MessageBox.Show(m.Msg.ToString()); }; thread.PostMessage(WM_COMMAND, IntPtr.Zero, IntPtr.Zero); Console.ReadLine(); } }
static void Main() { using (MessageThread thread = new MessageThread()) { const int WM_COMMAND = 0x111; thread.MessageHandlers[WM_COMMAND] = (m) => { MessageBox.Show(m.Msg.ToString()); }; thread.PostMessage(WM_COMMAND, IntPtr.Zero, IntPtr.Zero); Console.ReadLine(); } }