MessageWindow.SendMessage Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Sends a message to the message window and waits until the WndProc method has processed the message.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)


Public Shared Sub SendMessage ( _
    ByRef m As Message _
Dim m As Message

public static void SendMessage(
    ref Message m
static void SendMessage(
    Message% m
static member SendMessage : 
        m:Message byref -> unit 



The .NET Compact Framework provides the Message structure for generating Windows-based messages.


The following code example generates Windows-based messages in on override of the OnMouseMove method. Every time the mouse moves, or whenever there is a tap, this method generates a Windows-based message with the X and Y mouse coordinate values occupying the WParam and LParam parameters. This code example is part of a larger example provided for the MessageWindow class.

Dim msg As Microsoft.WindowsCE.Forms.Message = _
 Microsoft.WindowsCE.Forms.Message.Create(MsgWin.Hwnd, _
   MsgWindow.WM_CUSTOMMSG, New IntPtr(e.X), New IntPtr(e.Y))
Message msg = Message.Create(MsgWin.Hwnd,
MessageWindow.SendMessage(ref msg);

.NET Framework Security


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.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

See Also


MessageWindow Class

MessageWindow Members

Microsoft.WindowsCE.Forms Namespace