'Written by Chevol A. Davis
'display the current date and time
Private nextAlarmTimes As New ArrayList
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
TextBox1.Text = System.DateTime.Now
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'enable the timer set to 1000 which is equal to a second
Timer1.Enabled = True
Me.nextAlarmTimes.Add(System.DateTime.Now.AddSeconds(8))
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'for every click of the timer (1 sec.) update the date and time
TextBox1.Text = System.DateTime.Now
Dim alarmTime As Date
For i As Integer = 0 To Me.nextAlarmTimes.Count - 1 Step 1
alarmTime = CDate(Me.nextAlarmTimes(i))
If System.DateTime.Now > alarmTime Then
System.Diagnostics.Process.Start("http://www.google.com")
Me.nextAlarmTimes.Remove(0)
End If
Next
End Sub
Anyone please help me.
The source code above is a timer program which will open IE to google.com 8 second after run this program.
the problem is i already remove the the time from arraylist BUT.. the program will always open IE to google every 8 sec .!
How's this possible..... pls help
This post has been edited by naim_mahmood: Mar 5 2006, 05:37 PM
VB.NET - Arraylist, how to remove ?
Mar 3 2006, 11:54 AM, updated 20y ago
Quote
0.0157sec
0.55
5 queries
GZIP Disabled