|
|
|
SftButton.AVIPlay Method |
Defines the animation used as a button picture component.
Syntax
VB.NET |
Success = object.AVIPlay(ByVal PictureNumber As Short, ByVal Filename As String, ByVal StartFrame As Integer, ByVal EndFrame As Integer) As Boolean |
||
VB |
Success = object.AVIPlay(ByVal PictureNumber As Integer, ByVal Filename As String, ByVal StartFrame As Long, ByVal EndFrame As Long) As Boolean |
||
C#.NET |
bool Success = object.AVIPlay(short PictureNumber, string Filename, int StartFrame, int EndFrame); |
||
VC++ |
VARIANT_BOOL Success = object->AVIPlay(short PictureNumber, _bstr_t Filename, long StartFrame, long EndFrame); |
||
C |
HRESULT object->raw_AVIPlay(short PictureNumber, BSTR Filename, long StartFrame, long EndFrame, VARIANT_BOOL* Success); |
||
Delphi |
Success := object.AVIPlay(PictureNumber : Smallint; Filename : WideString; StartFrame : Integer; EndFrame : Integer) : WordBool; |
object
A SftButton object.
PictureNumber
Describes the graphic position to be used to display the animation.
Value |
Description |
0 |
The first graphic is used. The graphic defined using the Image1 property is replaced by the animation. |
1 |
The second graphic is used. The graphic defined using the Image2 property is replaced by the animation. |
Filename
Specifies the filename of the file containing the AVI clip to display. To load an animation from a resource instead, use the AVIPlayResource 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 AVIPlay method defines the animation used as a button picture component.
The AVIPlay method loads the animation from a file. AVIPlayResource can be used to load it from a module's resources.
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.