Show / Hide Table of Contents

Method ExtMisc.Hwnd


Overload

Gets window handle as wnd.

public static wnd Hwnd(this Control t, bool create = false)
Parameters
t  (Control)

A Control or Form etc. Cannot be null.

create  (bool)

Create handle if still not created. Default false (return default(wnd)). Unlike System.Windows.Forms.Control.CreateControl, creates handle even if invisible. Does not create child control handles.

Returns
wnd

Remarks

Should be called in control's thread. Calls System.Windows.Forms.Control.IsHandleCreated and System.Windows.Forms.Control.Handle.