SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the animation used as a button picture component.
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); |
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.
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.
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Application.Exit() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Define all animations at run-time using the AVIPlay method AxSftButtonSearch.AVIPlay(1, "..\Search.avi", 0, -1) AxSftButtonFind.AVIPlay(1, "..\FindComp.avi", 0, -1) AxSftButtonDownload.AVIPlay(1, "..\Download.avi", 0, -1) End Sub
Option Explicit Private Sub CloseButton_Click() End End Sub Private Sub Form_Load() ' Define all animations at run-time using the AVIPlay method SftButtonSearch.AVIPlay 1, ".\Search.avi", 0, -1 SftButtonFind.AVIPlay 1, ".\FindComp.avi", 0, -1 SftButtonDownload.AVIPlay 1, ".\Download.avi", 0, -1 End Sub
private void button1_Click(object sender, System.EventArgs e) { Application.Exit(); } private void Form1_Load(object sender, System.EventArgs e) { // Define all animations at run-time using the AVIPlay method axSftButtonSearch.AVIPlay(1, "..\\Search.avi", 0, -1); axSftButtonFind.AVIPlay(1, "..\\FindComp.avi", 0, -1); axSftButtonDownload.AVIPlay(1, "..\\Download.avi", 0, -1); }
TCHAR szPath[_MAX_PATH]; GetModuleFileName(AfxGetApp()->m_hInstance, szModule, sizeof(szModule)/sizeof(TCHAR)); _tsplitpath(szModule, szDrive, szPath, NULL, NULL); // Define all animations at run-time using the AVIPlay method // NOTE! If you are rebuilding this sample, you'll have to move the AVI files into the same folder as your executable _tmakepath(szModule, szDrive, szPath, _T("Search.avi"), NULL); m_vSearchButton->AVIPlay(1, _bstr_t(szModule), 0, -1); _tmakepath(szModule, szDrive, szPath, _T("FindComp.avi"), NULL); m_vFindButton->AVIPlay(1, _bstr_t(szModule), 0, -1); _tmakepath(szModule, szDrive, szPath, _T("Download.avi"), NULL); m_vDownloadButton->AVIPlay(1, _bstr_t(szModule), 0, -1); return TRUE; // return TRUE unless you set the focus to a control }
See Also SftButton Object | Object Hierarchy