[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Implements a Windows-based message.
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
The structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched.
You cannot directly create the structure. To create a Message structure, use the Create method. For efficiency, the structure uses any existing structures from its pool instead of creating an instance of a new one.
The following code example creates and sends a Windows-based message with the identifier of WM_CUSTOMMSG. The message is given the handle of a message window, named MsgWin, to which it sends the messages. The message contains values for the WParam and LParam parameters, which in this example are current x and y mouse coordinates as obtained from MouseEventArgs, e, in an OnMouseMove method.
This code example is part of a larger example provided for the MessageWindow component.
Dim msg As Message = Message.Create(MsgWin.Hwnd, MsgWindow.WM_CUSTOMMSG, New IntPtr(e.X), New IntPtr(e.Y)) MessageWindow.SendMessage(msg)
Message msg = Message.Create(MsgWin.Hwnd, MsgWindow.WM_CUSTOMMSG, (IntPtr)e.X, (IntPtr)e.Y); MessageWindow.SendMessage(ref msg);
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.