John
John

Reputation: 31

How do I create a WPF C# Application that pops up at a certain date and time set by the user?

I need it to be sort of like this application here: http://www.youtube.com/watch?v=Cw6Ml6gZqU8

It is a reminder. The user types in notes and then sets a date and time the form will pop back up. It is a Windows form App. However I need help with an WPF application that the user sets a certain date and time (say 3/15/2013 at 10:00p.m.) to run an event. Once the user sets the date and time, then they name the timer and save it. So far I have already added the .dll etc needed for a TimePicker (not available in WPF, but in an extended class from Windows forms).

I really need a start and so far all I have found is utilizing the Dispatch Timer class, but it only sets the time. Not finding any good resources. I will take article suggestions too! Thanks!

Upvotes: 1

Views: 1207

Answers (2)

Rafael A. M. S.
Rafael A. M. S.

Reputation: 637

You can make a thread or backgroundworker that check every minute the datetime using "DateTime.now()" then display a poupup dialog.

You'll need a process running anyways, but you can set it as a background process until the reminder apears...

Upvotes: 0

SHSE
SHSE

Reputation: 2433

Take a look at Quartz library. It provides functionality to schedule tasks in a way you describe.

Task scheduling might not be that simple as you think.

Upvotes: 1

Related Questions