Bagikan melalui


IVsUIShell.UpdateCommandUI Method

Informs the environment to update the state of the command bars (menus and toolbars).

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function UpdateCommandUI ( _
    fImmediateUpdate As Integer _
) As Integer
int UpdateCommandUI(
    int fImmediateUpdate
)
int UpdateCommandUI(
    [InAttribute] int fImmediateUpdate
)
abstract UpdateCommandUI : 
        fImmediateUpdate:int -> int
function UpdateCommandUI(
    fImmediateUpdate : int
) : int

Parameters

  • fImmediateUpdate
    Type: System.Int32

    [in] true if the update is performed synchronously (immediately). It is strongly recommended to pass false for this parameter.

Return Value

Type: System.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::UpdateCommandUI(
   [in] BOOL fImmediateUpdate
);

This method is equivalent to UpdateUI. It causes the environment to re-query by means of IOleCommandTarget the state of all commands. Typically, the update is not performed immediately but rather delayed until idle time.

.NET Framework Security

See Also

Reference

IVsUIShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace