PostMessage() private method

private PostMessage ( IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam ) : bool
hWnd System.IntPtr
Msg int
wParam System.IntPtr
lParam System.IntPtr
return bool
示例#1
0
 static void Main()
 {
     using (MessageWindow window = new MessageWindow())
     {
         const int WM_COMMAND = 0x111;
         window.MessageHandlers[WM_COMMAND] = (m) => { MessageBox.Show(m.Msg.ToString()); };
         window.PostMessage(WM_COMMAND, IntPtr.Zero, IntPtr.Zero);
         Application.Run(new Form());
     }
 }
示例#2
0
 static void Main()
 {
     using (MessageWindow window = new MessageWindow())
     {
         const int WM_COMMAND = 0x111;
         window.MessageHandlers[WM_COMMAND] = (m) => { MessageBox.Show(m.Msg.ToString()); };
         window.PostMessage(WM_COMMAND, IntPtr.Zero, IntPtr.Zero);
         Application.Run(new Form());
     }
 }