Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to create an window application (alarm clock )

so please help me stepwise how i can create alarm clock for my laptop using c#.net 2008 vesion
Posted

1 solution

This may not be as simple as you think.

A basic alarm clock is pretty easy: just set a Timer in your code for an Interval of 30000 (or 30 seconds in English) and check in the Tick event if the time matches the alarm time. If it does, clear the alarm time, and sound the alarm.

But...and it's a big but.

A laptop is not an alarm clock, and it doesn't expect you to make it into one. In order for your alarm to go off there are two conditions that must be met:
1) Your application must be running.
2) The laptop must be powered on and running, not hibernated or shut down. There is no mechanism to wake your laptop up and turn it on at 07:30 because your application wants it too...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900