Changes the parent window of the specified child window.
Namespace: Microsoft.VisualStudio
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Public Shared Function SetParent ( _
hWnd As IntPtr, _
hWndParent As IntPtr _
) As IntPtr
'使用
Dim hWnd As IntPtr
Dim hWndParent As IntPtr
Dim returnValue As IntPtr
returnValue = Win32Methods.SetParent(hWnd, _
hWndParent)
public static IntPtr SetParent(
IntPtr hWnd,
IntPtr hWndParent
)
public:
static IntPtr SetParent(
IntPtr hWnd,
IntPtr hWndParent
)
public static function SetParent(
hWnd : IntPtr,
hWndParent : IntPtr
) : IntPtr
Parameters
hWnd
Type: System.IntPtrA handle to the child window that should receive a new parent.
hWndParent
Type: System.IntPtrA handle to the new parent window.
Return Value
Type: System.IntPtr
If the function succeeds, a handle to the previous parent window, otherwise a null reference (Nothing in Visual Basic).
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.