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

Remarks

This property returns the handle of the message window, and 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);

.NET Framework Security

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Platforms

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Compact Framework

Supported in: 2.0, 1.0

See Also

Reference

MessageWindow Class
MessageWindow Members
Microsoft.WindowsCE.Forms Namespace