Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this windows form assignment. This is the design of the alarm clock. The (sample) text in the time label and in the

image text in transcribed

Need help with this windows form assignment.

This is the design of the alarm clock. The (sample) text in the time label and in the alarm time textbox are just to see what theyll look like when the clock is running when created it must always show the current time.

Double-click the form to create a Form Load method. Load the current time into the time label hour, minute second, AM/PM.

You might also save the forms background colour into a global System.Drawing.Color variable just sayn.

From the Component category in the toolbox, add a clock timer and an alarm timer. Have each issue a Tick event once a second. The clock timer is always active. When it issues a tick event, update the clock display and, if Alarm Activate is checked, check the alarm time.

when switch to 24 hour clock is checked - display the clock in 24 hour format (0-24 example 1PM=13) - the AM/PM must not be shown.

The alarm timer is initially inactive. When the displayed time equals the alarm time and Alarm Active is checked, activate the alarm timer. Every time it issues a tick event, play a sound you may wish to alternate the clock face from red to green & back on each tick.

When Stop Alarm is clicked or the Alarm Active checkbox is unchecked, de-activate the alarm timer and reset the background colour (if you were changing that too)

To play a sound:

System.Media.SoundPlayer player = new System.Media.SoundPlayer();

player.SoundLocation = @"c:\windows\media\Windows Logoff Sound.wav";

player.Play();

Alarm Clock 06:42:28 AM Stop Alarm Switch to 24 hour clock about Activate Alarm Error Messages Alarm Clock 06:42:28 AM Stop Alarm Switch to 24 hour clock about Activate Alarm Error Messages

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

Students also viewed these Databases questions

Question

7. How to Develop an Organizational Structure?

Answered: 1 week ago