D
Dan
I'm working on a project at the moment, it's an alarm clock (I'm a newbie so
please bare with me).
Basically I've got a timer on my page, the interval is set to 1 second and
it's activated once I set the alarm.
The alarm works if I set it for maybe half an hour, or even an hour. But
I've been testing it overnight and when I wake up my computer has been
rebooting all night.
This continues to happen and the only way to fix it has been to repair
Windows (twice), I'm just wondering if the timer interval is too short, or
if there is a problem with the memory usage?
I have no idea what causes the reboot so any help would be much appreciated,
I've included the code for my timer below!
Thanks![Smile :) :)](/styles/default/custom/smilies/smile.gif)
Here is the code from my timer.
private void timer1_Tick(object sender, EventArgs e)
{
string TheHour = System.DateTime.Now.Hour.ToString();
string TheMinute = System.DateTime.Now.Minute.ToString();
if (TheHour == textBox1.Text && TheMinute == textBox2.Text)
{
timer1.Stop();
timer1.Enabled = false;
axWindowsMediaPlayer1.URL = listBox1.SelectedItem.ToString();
axWindowsMediaPlayer1.Ctlcontrols.play();
axWindowsMediaPlayer1.settings.setMode("Loop", true);
MessageBox.Show(textBox3.Text);
}
}
please bare with me).
Basically I've got a timer on my page, the interval is set to 1 second and
it's activated once I set the alarm.
The alarm works if I set it for maybe half an hour, or even an hour. But
I've been testing it overnight and when I wake up my computer has been
rebooting all night.
This continues to happen and the only way to fix it has been to repair
Windows (twice), I'm just wondering if the timer interval is too short, or
if there is a problem with the memory usage?
I have no idea what causes the reboot so any help would be much appreciated,
I've included the code for my timer below!
Thanks
![Smile :) :)](/styles/default/custom/smilies/smile.gif)
Here is the code from my timer.
private void timer1_Tick(object sender, EventArgs e)
{
string TheHour = System.DateTime.Now.Hour.ToString();
string TheMinute = System.DateTime.Now.Minute.ToString();
if (TheHour == textBox1.Text && TheMinute == textBox2.Text)
{
timer1.Stop();
timer1.Enabled = false;
axWindowsMediaPlayer1.URL = listBox1.SelectedItem.ToString();
axWindowsMediaPlayer1.Ctlcontrols.play();
axWindowsMediaPlayer1.settings.setMode("Loop", true);
MessageBox.Show(textBox3.Text);
}
}