1.11M Members

Reminder Pop-up Using Windows Service

 
0
 

Hi
I want to create a Reminder for the User which should remind him about his activity.
It should be like a windows form with some content & snooze,Close buttons.
But I am unable to use GUI in Windows services :( ...
The error is as follows

"It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application"

I tried the Code as :

public void _Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            Form formReminder = new Reminder();
            if (formReminder.Visible == false)
            {
                formReminder.ShowDialog();
                //timerClass.StopTimer();
            }
            else
            {
                timerClass.StartTimer();
            }

        }

public void _Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) 
{ 
Form formReminder = new Reminder();
 if (formReminder.Visible == false)
 { 
formReminder.ShowDialog();
 //timerClass.StopTimer(); 
} 
else 
{
 timerClass.StartTimer(); 
} 
}

Is there is any other way to acquire this????
Please Help me in this regard.

Thanks In Advance.....

 
0
 

Try

formReminder.Show();

instead of

formReminder.ShowDialog();
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article