[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, UIntPtr wParam,
IntPtr lParam);
Declare Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer,
ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
None.
Parameters
hWnd can be set using the Handle property of a Control. Msg constants can be found at http://www.codeproject.com/csharp/cswindowsmessages.asp.
Example useage to enumerate windows, and send a message to one (in C#): http://www.sloppycode.net/sloppycode/Article-104.html
private const int WM_NCPAINT = 0x0085;
// Tell ourselves to paint our border
private void foo()
{
SendMessage(this.Handle,WM_NCPAINT,new IntPtr(0),new IntPtr(0));
}
Do you know one? Please contribute it!