I created my own File Copy dialog (had to) and I'm trying to use a timer to add a simple 5-frame animation.
I created a form and placed a Timer object on it. The timer is set to Enabled with an interval of 150 (I also tried 15.)
When I call the form, the timer never starts (I placed a breakpoint in the "_Tick" event to confirm.)
I call the form from another form using:
BackupData() IS executed. It contains frmCopy.Show() & frmCopy.Refresh()Code:frmCopy.Activate() frmCopy.Timer1.Enabled = True BackupData() ' Backup settings.
frmCopy's code:
A breakpoint in the form_Load confirms it loads just fine, but a breakpoint in the timer event is never tripped and I have no idea why.Code:Public Class frmCopy Private Sub frmCopy_Load(sender As Object, e As EventArgs) Handles MyBase.Load Timer1.Enabled = True Timer1.Start() 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
Any help is appreciated.




Reply With Quote
