Create a C# Form with a textbox and a button. solved

Create a C# Form with a textbox and a button. solved

Create a C# Form with a textbox and a button. The box is for a user to enter a number of seconds. And when the user clicks the button, the program displays the equivalent number of hours, minutes and seconds using a MessageBox.Show method. If the seconds entered is less than 60, your program should only display the seconds; if the seconds is a least 60 and less than 3600, your program should display minutes and seconds; if the second is at least 3600, your program should display hours, minutes and seconds. Use the following data to test your program:

750 seconds: 12 minutes, 30 seconds

7565 seconds: 2 hours, 6 minutes, 5 seconds

Requirements:

 

·         Input validation: The number of seconds cannot  exceed 86400.  You must use textbox’s Validating event to do the  validation.

 
Powered by