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)
Syntax
'Déclaration
Function Animation ( _
fOnOff As Integer, _
ByRef pvIcon As Object _
) As Integer
'Utilisation
Dim instance As IVsStatusbar
Dim fOnOff As Integer
Dim pvIcon As Object
Dim returnValue As Integer
returnValue = instance.Animation(fOnOff, _
pvIcon)
int Animation(
int fOnOff,
ref Object pvIcon
)
int Animation(
[InAttribute] int fOnOff,
[InAttribute] Object^% pvIcon
)
function Animation(
fOnOff : int,
pvIcon : Object
) : int
Parameters
fOnOff
Type: System.Int32[in] Set to true to turn on animation, or set to false to turn it off..
pvIcon
Type: System.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.
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 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.
Permissions
- 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.