I needed to create a Copy Dialog from scratch. It will (I hope) show the file/folder being copied with a Copy Animation (similar to the default UIDialog.)
I created a form and put a PictureBox & Timer on it. I set the Timer default to Enabled and Interval to 150. Code was added (below) to the "_Tick" event to change the picbox source image (5 frames.)
When I run my program, and perform a frmCopyAni.Show (followed by some file copy commands), the form appears and the computer starts copying in the background, but the timer never runs (I put a break in the Tick event but it's never triggered.) I added Timer.Enabled to Form_Load but it didn't help.
...calls...
I'm not sure what I'm doing wrong (if anything.) I think the timer won't run while FileCopy is taking place. Any help is appreciated.
I created a form and put a PictureBox & Timer on it. I set the Timer default to Enabled and Interval to 150. Code was added (below) to the "_Tick" event to change the picbox source image (5 frames.)
When I run my program, and perform a frmCopyAni.Show (followed by some file copy commands), the form appears and the computer starts copying in the background, but the timer never runs (I put a break in the Tick event but it's never triggered.) I added Timer.Enabled to Form_Load but it didn't help.
Timer start/end:
frmCopy.Timer1.Start()
BackupData() ' Backup settings.
frmCopy.Timer1.Stop()
...calls...
frmCopy:
Public Class frmCopy
Private Sub frmCopy_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
intTick += 1
If intTick > 5 Then intTick = 1
picCopyAni.Image = imgCopyAni.Images.Item(intTick)
End Sub
End Class
I'm not sure what I'm doing wrong (if anything.) I think the timer won't run while FileCopy is taking place. Any help is appreciated.
Last edited: