Hide

SftButton/OCX 3.0 - Button Control

Display
Print

AVIPlayResource Method, SftButton Object

Defines the animation used as a button picture component.

Syntax

VB.NETSuccess = object.AVIPlayResource(ByVal PictureNumber As Short, ByVal ResourceHandle As Integer, ByVal ResourceNumber As Integer, ByVal StartFrame As Integer, ByVal EndFrame As Integer) As Boolean
VBSuccess = object.AVIPlayResource(ByVal PictureNumber As Integer, ByVal ResourceHandle As Long, ByVal ResourceNumber As Long, ByVal StartFrame As Long, ByVal EndFrame As Long) As Boolean
C#.NETbool Success = object.AVIPlayResource(short PictureNumber, int ResourceHandle, int ResourceNumber, int StartFrame, int EndFrame);
VC++VARIANT_BOOL Success = object->AVIPlayResource(short PictureNumber, long ResourceHandle, long ResourceNumber, long StartFrame, long EndFrame);
CHRESULT object->raw_AVIPlayResource(short PictureNumber, long ResourceHandle, long ResourceNumber, long StartFrame, long EndFrame, VARIANT_BOOL* Success);

object

A SftButton object.

PictureNumber

Describes the graphic position to be used to display the animation.

ValueDescription
0The first graphic is used. The graphic defined using the Image1 property is replaced by the animation.
1The second graphic is used. The graphic defined using the Image2 property is replaced by the animation.

ResourceHandle

The module handle of the module containing the AVI clip resource ResourceNumber. To load an animation from a file instead, use the AVIPlay method.

ResourceNumber

The resource number of the resource to load as button animation. To load an animation from a file instead, use the AVIPlay method.

StartFrame

Specifies the first frame number of the animation with which the display starts.

EndFrame

Specifies the last frame number of the animation with which the display ends. If -1 is specified, the animation runs continuously.

Success

Returns True if the animation is successfully loaded from the specified file Filename, otherwise False is returned.

Comments

The AVIPlayResource method defines the animation used as a button picture component.

The AVIPlayResource method loads the animation from a module's resources. AVIPlay can be used to load it from a file.

Animations can only be defined at run-time. If a file is used to load an animation, this file must be distributed with an application.

The AVITransparent property can be used to define the transparency of the animation.

The Windows Animation control is used (SysAnimate32) so only silent AVI clips without sound can be used. If an AVI clip contains sound, the AVIPlay and AVIPlayResource methods will fail and return False.

The layout of the button label and the position and alignment of the picture components are defined using the Orientation, Image1AlignHorz, Image1AlignVert, Image2AlignHorz and Image2AlignVert properties.

See Also SftButton Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.