By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,183 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,183 IT Pros & Developers. It's quick & easy.

HELP: expose Windows dialog from Windows Service

P: n/a
I am writing a windows service in C#.NET which will manage image capturing
devices, when client connects to the service, at some point the service need
to expose a device dialog to the client for setting some device specific
parameters. According to MSDN docs, classes within the Windows Forms
namespace are not supported for use within a Windows service. So How can I
do that?
Thanks!
HELP: expose Windows dialog from Windows Service
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hank,

There is a quick and dirty way, and there is the right way.

If you want, you can mark a service as being able to interact with the
desktop. This is an option on the service that you have to check off. If
you use that, you should be able to use classes from the Windows Forms
namespace in your service.

However, this is the absolutely wrong way to do it.

You said that you have clients that are accessing the service. The
client should use remoting (or some other message/distributed object
technology/method) to make a request to the service and get a response back.
If you need to show a dialog, then the response should indicate what that
you need to show something, and the client will be responsible for showing
that to the user.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Hank" <hy***@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I am writing a windows service in C#.NET which will manage image capturing
devices, when client connects to the service, at some point the service
need to expose a device dialog to the client for setting some device
specific parameters. According to MSDN docs, classes within the Windows
Forms namespace are not supported for use within a Windows service. So How
can I do that?
Thanks!
HELP: expose Windows dialog from Windows Service

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.