Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
MessageWindow Class
 SendMessage Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
MessageWindow..::.SendMessage Method

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)
Visual Basic (Declaration)
Public Shared Sub SendMessage ( _
    ByRef m As Message _
)
Visual Basic (Usage)
Dim m As Message

MessageWindow.SendMessage(m)
C#
public static void SendMessage(
    ref Message m
)
Visual C++
public:
static void SendMessage(
    Message% m
)
JScript
public static function SendMessage(
    m : Message
)

Parameters

m
Type: Microsoft.WindowsCE.Forms..::.Message%
A Windows-based message.

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.

Visual Basic
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))
   MessageWindow.SendMessage(msg)

C#
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.

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker