CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2001
    Location
    Los Angeles, CA, United States
    Posts
    47

    File Copy Anmation

    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.

  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: File Copy Anmation

    Animation control




    HTH

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

  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: File Copy Anmation

    '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
    [email protected]
    Iouri Boutchkine
    [email protected]

  4. #4
    Join Date
    May 2001
    Posts
    46

    Re: File Copy Anmation

    Great code, works fine...


  5. #5
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: File Copy Anmation

    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

  6. #6
    Join Date
    Aug 2001
    Location
    Northern Virginia
    Posts
    2

    Re: File Copy Anmation

    I am a beginner. How do I add animation control? Where control has animation control?

    Thanks
    Vineet


  7. #7
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: File Copy Anmation

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured