SendMessage() public static method

Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
public static SendMessage ( IntPtr windowHandle, WindowsMessages message, UIntPtr wParam, IntPtr lParam ) : IntPtr
windowHandle System.IntPtr A handle to the window whose window procedure will receive the message.
message WindowsMessages The message to be sent.
wParam System.UIntPtr Additional message-specific information.
lParam System.IntPtr Additional message-specific information.
return System.IntPtr
示例#1
0
 /// <summary>
 /// Sends the specified message to a window or windows.
 /// The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
 /// </summary>
 /// <param name="message">The message to be sent.</param>
 /// <param name="wParam">Additional message-specific information.</param>
 /// <param name="lParam">Additional message-specific information.</param>
 /// <returns>The return value specifies the result of the message processing; it depends on the message sent.</returns>
 public IntPtr SendMessage(uint message, UIntPtr wParam, IntPtr lParam)
 {
     return(WindowCore.SendMessage(Handle, message, wParam, lParam));
 }