is it possible to run a windows form from a windows service application?

  • Thread starter Thread starter Loane Sharp
  • Start date Start date
L

Loane Sharp

Hi there

Is it possible to set the environment for a windows service application to
anything other than "Environment.UserInteractive = False"? Does this
(whether I can or can't set the user interactive mode to true) depend on
whether the service is running on the local system account or a user
account?

For instance, when the service is running under the local system account, I
can display a message box to the default user using the message box
"DefaultDesktopOnly" option, and to the active user using the
"ServiceNotification" option, which makes sense since any number of users
might be logged on when the service is running. But it also makes sense to
be able to show a windows form in a similar way ... or not?!

Please help!

Best regards
Loane
 
Hi there

Is it possible to set the environment for a windows service application to
anything other than "Environment.UserInteractive = False"? Does this
(whether I can or can't set the user interactive mode to true) depend on
whether the service is running on the local system account or a user
account?

For instance, when the service is running under the local system account,
I can display a message box to the default user using the message box
"DefaultDesktopOnly" option, and to the active user using the
"ServiceNotification" option, which makes sense since any number of users
might be logged on when the service is running. But it also makes sense to
be able to show a windows form in a similar way ... or not?!

Please help!

Best regards
Loane

Hi Loane,

The service needs to be given interactive privileges from the service
manager itself. I can't remember the exact wording of the check-box, but
when you visit the service properties in the Service Control Manager, you
need to give it interactive rights. Then, in your service application you
can use GUI code.

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top