IVsUIShell.CenterDialogOnWindow Method
Centers the provided dialog box HWND on the parent HWND (if provided), or on the main IDE window.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function CenterDialogOnWindow ( _
hwndDialog As IntPtr, _
hwndParent As IntPtr _
) As Integer
int CenterDialogOnWindow(
IntPtr hwndDialog,
IntPtr hwndParent
)
int CenterDialogOnWindow(
[InAttribute] IntPtr hwndDialog,
[InAttribute] IntPtr hwndParent
)
abstract CenterDialogOnWindow :
hwndDialog:IntPtr *
hwndParent:IntPtr -> int
function CenterDialogOnWindow(
hwndDialog : IntPtr,
hwndParent : IntPtr
) : int
Parameters
hwndDialog
Type: IntPtr[in] Specifies HWND dialog.
hwndParent
Type: IntPtr[in] Specifies HWND parent.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsUIShell::CenterDialogOnWindow(
[in] HWND hwndDialog,
[in] HWND hwndParent
);
If the IDE is in SDI mode, the dialog box HWND will be centered on the monitor workspace.
.NET Framework Security
- 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.