See below from the MSDN help about windows services... as you can see one issue is that windows services are designed not to show any user interface, as they are able to run when there is no interactive user logged on. Perhaps you should reconsider why you are using a windows service if you need it to interact with a user. Also consider using the event log to write event information about your application, rather than using message boxes, that way if the user is not logged in, the event information is still stored. Or even your own instrumentation and logging facility to log activity information, and then build a user interface application that accesses that data, rather than trying to implement ui in the windows service itself.
 
Hope this helps
 
Matt

Microsoft Windows services, formerly known as NT services, enable you to create long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. This makes services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. You can also run services in the security context of a specific user account that is different from the logged-on user or the default computer account. For more information about services and Windows sessions, see the "About Services" section in the Platform SDK documentation in MSDN Online.


 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mail2sadanand
Sent: 21 October 2005 13:59
To: [email protected]
Subject: [Microsofts_C_Sharp] message dialog box in windows service

Hi,

i am writing a windows service using c#, i would like to provide the
functionality to the user i.e. while runing the windows service,
process should be shown to the user via message dialog box.

can any one help on this.

Regards
Sadanand
Shreyas IT






YAHOO! GROUPS LINKS




Reply via email to