Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

IVsStatusbar.Animation Method

Controls the animation of the icon in the status bar.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int Animation (
	[InAttribute] int fOnOff,
	[InAttribute] ref Object pvIcon
)
int Animation (
	/** @attribute InAttribute() */ int fOnOff, 
	/** @attribute InAttribute() */ /** @ref */ Object pvIcon
)
JScript does not support passing value-type arguments by reference.

Parameters

fOnOff

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

pvIcon

[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.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

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.

Community Additions

ADD
Show:
© 2015 Microsoft