0

I need a timer that will change the text of a combobox which is binded to a database.
My Application which is based on hospital management wherein a doctor has to visit rooms within 6 hours. If 6 hours elapse the combo should show "need......" and if not something "......" and the changes should be also written in the database as there are many rooms. there should also be a button that resets the timer. please help me. Thank you so much

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by JOSheaIV
0

I need a timer that will change the text of a combobox which is binded to a database.
My Application which is based on hospital management wherein a doctor has to visit rooms within 6 hours. If 6 hours elapse the combo should show "need......" and if not something "......" and the changes should be also written in the database as there are many rooms. there should also be a button that resets the timer. please help me. Thank you so much

There is a timer that you can add to your application, just drag it from the toolbox to anywhere on your application.

private void timer1_Tick(object sender, EventArgs e)
{
//Code to be executed
}

Double click it and add the code to be executed when it ticks. you can set how long between each tick by setting the interval property of the timer, this is an int and holds the time in ms between each tick so for 6 hours you would need 21,600,000 as the value.

//set timer to tick every 10seconds
timer1.Interval = 10000

there are also methods for starting and stopping the timer.

Hope this helps

Edited by midimatt: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.