Re: creating an alarm clock in mfc

that is my point, I would use the system time to "keep track of the time" and just do a simple comparison between the system time and the selected alarm time.


regards,
inthane
. For Blind Programming assistance, Information, Useful Programs, and Links to Jamal Mazrui's Text tutorial packages and Applications, visit me at:
http://grabbag.alacorncomputer.com
. to be able to view a simple programming project in several programming languages, visit the Fruit basket demo site at:
http://fruitbasketdemo.alacorncomputer.com

----- Original Message ----- From: "Andy B" <a_borka@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Friday, October 26, 2007 2:08 PM
Subject: RE: creating an alarm clock in mfc


I can't use Timer.Stop() because it needs to still keep track of time even
after the system time reaches the picker time. Here is my original code.
Just a note and a reminder, the current code listed below pops up a
MessageBox every second instead of only once when the system time and the
picker time is the same.

private void Timer_Tick(object Sender, EventArgs e) {
bool ShowBox=false;
if((!ShowBox) && (DateTime.Now.CompareTo(Time.Value))) {
ShowBox=true; //we shouldn't see the box again.
MessageBox.Show("It's time...");
}
}



-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Jamal Mazrui
Sent: Friday, October 26, 2007 4:50 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: creating an alarm clock in mfc


Can't you use the Stop method of the timer to prevent the message box from
repeating?  If not, please repost all relevant code.

Jamal

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind

Other related posts: