Click to See Complete Forum and Search --> : File Copy Anmation


Jeong
August 6th, 2001, 08:45 PM
In my program, I have to implement file copy animation(I don't know the name of the ACTIVEX exactly. I 'm explaining the box that is displayed when copy files.)
Which component do I have to load?
Anyone who know it let me know.
Thank you.

I'm a senior programmer.
Working at CamSight, Dental imaging solutions industry.

cksiow
August 6th, 2001, 10:11 PM
Animation control




HTH

cksiow
http://vblib.virtualave.net - share our codes

Iouri
August 7th, 2001, 07:09 AM
'this proc will copy files and shows an animated picture (it will create a folder if it does not exist)

Private Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAborted As Boolean
hNameMaps As Long
sProgress As String
End Type
Private Const FO_DELETE = &H3
Private Const FO_COPY = &H2
Private Const FO_MOVE = &H1
Private Const FO_RENAME = &H4
Private Const FOF_ALLOWUNDO = &H40
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long

Private Sub Command1_Click()
Dim SHFileOp As SHFILEOPSTRUCT

With SHFileOp
.pFrom = "c:\IouriApps\*.*"
.pTo = "c:\temp\download"
.wFunc = FO_COPY
End With
'perform file operation
SHFileOperation SHFileOp
MsgBox "The Folder '" + SHFileOp.pFrom + "' has been Copied To : " & SHFileOp.pTo, vbInformation + vbOKOnly, App.Title
End Sub


Iouri Boutchkine
iouri@hotsheet.com

Alejandro Ochoa
August 7th, 2001, 08:50 AM
Great code, works fine...

John G Duffy
August 7th, 2001, 10:01 AM
Visual Basic provided a bunch of .AVI files for this sort of thing to be used with the Animation control. The below routine allows you to select one and "Play" it. Included in the supplied AVI files is the FILECOPY.AVI. Add the code listed below to a form that has a two command buttons, a commonDialog control and a Animation control on it.
The animation control can be found in component "Microsoft Windwos Common controls-2..."

private Sub cmdPlay_Click()
' Configure a CommonDialog control to allow the
' user to find .avi files to play. The CommonDialog
' control is named "dlgOpen." The Animation control
' is named "anmAVI."
dlgOpen.Filter = "avi files (*.avi)|*.avi"
dlgOpen.InitDir = "C:\Program Files\Microsoft Visual Studio\Common\Graphics\Videos"
dlgOpen.ShowOpen
anmAVI.Open dlgOpen.FileName
anmAVI.Play
End Sub

'This code stops the video playing:

private Sub cmdStop_Click()
anmAVI.Stop
End Sub




John G

Vineet Gupta
August 29th, 2001, 03:07 PM
I am a beginner. How do I add animation control? Where control has animation control?

Thanks
Vineet

John G Duffy
September 2nd, 2001, 02:32 PM
In case you havent found the animation control yet, go To Project/Components then select Microsoft Windows Common Controls-2 either 5.0 or 6.0 depending on the release you wish to use

John G