MessageWindow.Hwnd Property

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
'Usage
Dim instance As MessageWindow
Dim value As IntPtr

value = instance.Hwnd
public IntPtr Hwnd { get; }
public:
property IntPtr Hwnd {
    IntPtr get ();
}
/** @property */
public IntPtr get_Hwnd ()
public function get Hwnd () : IntPtr
Not applicable.

Property Value

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.

Example

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);

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Compact Framework

Supported in: 2.0, 1.0

See Also

Reference

MessageWindow Class
MessageWindow Members
Microsoft.WindowsCE.Forms Namespace