MessageBox froma a windows service

I need to show a dialog box when something occurs during the execution of a windows service, but it's impossible using MessageBox.Show(string).

Any solution?

Thanks!

Enric.
EM77Asked:
Who is Participating?
 
Svetlin_PanayotovCommented:
Well - try this
MessageBoxA(NULL,"Message","Caption",MB_OK);
0
 
123654789987Commented:
put the following code in the service OnStart event and I got a messageBox when the service was started

System.Windows.Forms.MessageBox.Show("Service started on:","",System.Windows.Forms.MessageBoxButtons.YesNo,System.Windows.Forms.MessageBoxIcon.Question,System.Windows.Forms.MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.ServiceNotification);
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.