Udostępnij za pośrednictwem


IVsStatusbar.Animation(Int32, Object) Method

Definition

Controls the animation of the icon in the status bar.

public:
 int Animation(int fOnOff, System::Object ^ % pvIcon);
int Animation(int fOnOff, winrt::Windows::Foundation::IInspectable const & & pvIcon);
public int Animation (int fOnOff, ref object pvIcon);
abstract member Animation : int * obj -> int
Public Function Animation (fOnOff As Integer, ByRef pvIcon As Object) As Integer

Parameters

fOnOff
Int32

[in] Set to true to turn on animation, or set to false to turn it off..

pvIcon
Object

[in] If the VARIANT is a VT_I2, it refers to the SBAI_Index of predefined animated icons. If this parameter is a VT_I4, it refers to an HBITMAP containing the filmstrip image for animation, whose width should be a multiple of its height.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code. If this method is called in an instance of Visual Studio running in a remote session, returns S_FALSE, and the icon is not displayed.

Remarks

COM Signature

From vsshell.idl:  
HRESULT IVsStatusbar::Animation(  
   [in]BOOL fOnOff,  
   [in]VARIANT *pvIcon  
);  

You should call this method before you perform an operation that takes an indeterminate amount of time so the user has a visual representation that the operation is continuing successfully. Call the Progress method instead of Animation if definite progress for an operation can be ascertained during the operation.

Each frame in the animation is square with a size of height X height, and is displayed at five frames per second. You are responsible for destroying the bitmap of the customized filmstrip.

The pvIcon parameter must be passed both when turning on the animation and when turning it off.

Values for SBAI_Index are listed in the following table.

SBAI_Index Value1 Description
SBAI_General 0 Standard animation icon.
SBAI_Print 1 Animation when printing.
SBAI_Save 2 Animation when saving files.
SBAI_Deploy 3 Animation when deploying the solution.
SBAI_Synch 4 Animation when synchronizing files over the network.
SBAI_Build 5 Animation when building the solution.
SBAI_Find 6 Animation when searching.

The values of SBAI_Index are taken from vsshell.idl.

Applies to