MessageWindow.Hwnd Property

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

Gets the handle of the message window.

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

Syntax

'Declaration
Public ReadOnly Property Hwnd As IntPtr
    Get
'Usage
Dim instance As MessageWindow
Dim value As IntPtr

value = instance.Hwnd
public IntPtr Hwnd { get; }
public:
property IntPtr Hwnd {
    IntPtr get ();
}
member Hwnd : IntPtr

Property Value

Type: System.IntPtr
This property returns the handle of the message window.

Remarks

This property is used for creating Windows-based messages to identify the handle the message is sent to.

Examples

vb#c#

The following code example creates and sends a Windows-based message. The first parameter for the Create method is the handle ( Hwnd ) to the message window, which in this case is the handle to MsgWin, an instance of a derived class from MessageWindow. 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))
   MessageWindow.SendMessage(msg)
Message msg = Message.Create(MsgWin.Hwnd,
 MsgWindow.WM_CUSTOMMSG,
 (IntPtr)e.X,
 (IntPtr)e.Y);
MessageWindow.SendMessage(ref msg);

.NET Framework Security

Platforms

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

Reference

MessageWindow Class

MessageWindow Members

Microsoft.WindowsCE.Forms Namespace