次の方法で共有


IVsUIShell.CenterDialogOnWindow(IntPtr, IntPtr) Method

Definition

Centers the provided dialog box HWND on the parent HWND (if provided), or on the main IDE window.

public:
 int CenterDialogOnWindow(IntPtr hwndDialog, IntPtr hwndParent);
public int CenterDialogOnWindow (IntPtr hwndDialog, IntPtr hwndParent);
abstract member CenterDialogOnWindow : nativeint * nativeint -> int
Public Function CenterDialogOnWindow (hwndDialog As IntPtr, hwndParent As IntPtr) As Integer

Parameters

hwndDialog
IntPtr

nativeint

[in] Specifies HWND dialog.

hwndParent
IntPtr

nativeint

[in] Specifies HWND parent.

Returns

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.

Applies to