I am having a problem with setting up a timer seems stupid I know.
I have the timer in the form called timer1 (real intuitive I know)
Anyway here is what I have been trying to do. I want the timer to refresh my form say every 5 seconds or so. so I have coded in the timer event:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Refresh()
Timer1.Start()
Application.DoEvents()
MessageBox.Show(" I am refreshed")
End Sub
When I click a button I have:
Private Sub cmdReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReport.Click
Timer1.Enabled = True
ReportGenerator()
End Sub
If I leave out the call to the other sub the timer works however when I call the other sub (which calls other subs)I get no timer any more, I know this because the messagebox doesn't pop up anymore.
Probably very simple and I am missing it. I tried the help in .net and it gave me no clue what I am missing, I have done a search in the forum but I didn't find any basics of the timer event that would help me here.
Thanks for your time.
To go where no programmer has gone before.
I have the timer in the form called timer1 (real intuitive I know)
Anyway here is what I have been trying to do. I want the timer to refresh my form say every 5 seconds or so. so I have coded in the timer event:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Refresh()
Timer1.Start()
Application.DoEvents()
MessageBox.Show(" I am refreshed")
End Sub
When I click a button I have:
Private Sub cmdReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReport.Click
Timer1.Enabled = True
ReportGenerator()
End Sub
If I leave out the call to the other sub the timer works however when I call the other sub (which calls other subs)I get no timer any more, I know this because the messagebox doesn't pop up anymore.
Probably very simple and I am missing it. I tried the help in .net and it gave me no clue what I am missing, I have done a search in the forum but I didn't find any basics of the timer event that would help me here.
Thanks for your time.
To go where no programmer has gone before.