[This is preliminary documentation and is subject to change.]

Gets or sets parent of current Window

Namespace: Tools.WindowsT.NativeT
Assembly: Tools.Win (in Tools.Win.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[LCategoryAttribute(typeof(ControlsWin), "Relationship_c", "Relationship", 
	LCategoryAttribute..::..enmLookUpOrder.ResourceFirst)]
public Win32Window Parent { get; set; }
Visual Basic
<LCategoryAttribute(GetType(ControlsWin), "Relationship_c", "Relationship",  _
	LCategoryAttribute..::..enmLookUpOrder.ResourceFirst)> _
Public Property Parent As Win32Window
	Get
	Set
Visual C++
[LCategoryAttribute(typeof(ControlsWin), L"Relationship_c", L"Relationship", 
	LCategoryAttribute..::..enmLookUpOrder::ResourceFirst)]
public:
property Win32Window^ Parent {
	Win32Window^ get ();
	void set (Win32Window^ value);
}
F#
[<LCategoryAttribute(typeof(ControlsWin), "Relationship_c", "Relationship", 
    LCategoryAttribute..::..enmLookUpOrder.ResourceFirst)>]
member Parent : Win32Window with get, set
JScript
function get Parent () : Win32Window
function set Parent (value : Win32Window)

Field Value

A Win32Window to reparent current window into. Can be null to un-parent current window completely.

Return Value

Current parent of current window. Can return null if current window has no parent or there was error when obtaining parent (ie. Handle is invalid)

Remarks

Setting value to Win32Window with Handle of zero has the same effect as setting it to null. Non-top-level windows (such as button) cannot be unparented. Setting null for shuch window will cause window to be parented into desktop - not by this implementation but by the OS.

Exceptions

ExceptionCondition
Tools.API..::..Win32APIExceptionSetting failed. It may indicate that hWnd does not point to existing window or attempt to set parent to the same window or to one of children.

See Also