Rich,
I do not know if you can do this sample I made a short while ago, it is
about a splash form, however there are a lot of timers in it
Keep in mind that there are 4 timers by the way
windows.forms.timer
system.timers.timer
threading.thread.timer
and a Microsoft.VisualBasic one
\\\form1 needs 2 textboxes and a button
Private WithEvents frm As Form2
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim timer1 As New System.Windows.Forms.Timer
'You can drag it as well to your form, than those directcasts you
see are not needed
AddHandler timer1.Tick, AddressOf mytimer1
'this can as well be done using the 2 comboboxes on the codelayout
TextBox1.Text = "0"
timer1.Enabled = True
timer1.Interval = 400
Dim timer2 As New System.Windows.Forms.Timer
End Sub
Public Sub mytimer1(ByVal sender As Object, _
ByVal e As System.EventArgs) 'this is the event what is done when the
time elapsed
TextBox1.Text = (CInt(TextBox1.Text) + 1).ToString
DirectCast(sender, System.Windows.Forms.Timer).Enabled = True
'sender is the object of the timer
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
frm = New Form2
frm.Show()
frm.Top = Me.Top
frm.Left = Me.Left + 200
End Sub
Private Sub f_form2ready(ByVal message As String) _
Handles frm.form2ready
TextBox2.Text = message
frm.Dispose()
End Sub
///
\\\form2 needs one textbox
Friend Event form2ready(ByVal message As String)
Private Sub Form2_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim timer1 As New System.Windows.Forms.Timer
AddHandler timer1.Tick, AddressOf mytimer1
'this can as well be done using the 2 comboboxes on the codelayout
timer1.Enabled = True
timer1.Interval = 300
End Sub
Public Sub mytimer1(ByVal sender As Object, _
ByVal e As System.EventArgs)
Static counter As Integer = 0
Dim mystring As String = "I am searching for the time "
TextBox1.Text = mystring.Substring(counter)
DirectCast(sender, System.Windows.Forms.Timer).Enabled = True
'sender is the object of the timer
counter += 1
If counter = 22 Then
DirectCast(sender, Timer).Enabled = False
RaiseEvent form2ready(Now.TimeOfDay.ToString)
Else
Me.Opacity -= 0.04
DirectCast(sender, Timer).Enabled = True
'Sender is the object of the timer
End If
End Sub
///(I have this sample as well with a thread however that is not your
question
I hope this helps a little bit?
Cor