windows form in service

R

Raan

hi all,

i am creating a windows service. i have created a windows form on the
same.

when i logout the windows form get closed. Is it possible to only hide
the form at the time of logoff.

i want that my form remains till the windows service is not stopped


regards,
raan
 
H

Herfried K. Wagner [MVP]

Raan said:
i am creating a windows service. i have created a windows form on the
same.

when i logout the windows form get closed. Is it possible to only hide
the form at the time of logoff.

i want that my form remains till the windows service is not stopped

Services typically do not have a UI for security reasons. Instead of adding
your form to the service, write an autostart client applications which
contains the user interface and interacts with the server via IPC
meachanisms such as sockets, named pipes, remoting, WCF, ...
 
M

Mr. Arnold

Raan said:
hi all,

i am creating a windows service. i have created a windows form on the
same.

when i logout the windows form get closed. Is it possible to only hide
the form at the time of logoff.
I know there is a namespace System something that allows a Windows Desktop
solution to check for logout on the desktop, and it will raise an event in
the running .Net solution. I am sorry. I cannot remember what System
namespace, maybe Diagnostics. But I know it's there and you can use it.

I know I saw this when I was using Google to search out another .Net
solution.
i want that my form remains till the windows service is not stopped

You may be able to use an OnCustomeCommnad() in the service. If the service
is not active when you call the Service's OnCustomeCommnad() from your
Windows desktop solution, you should be able to dectec it on a try/catch,
which would be in the Logout event of that (Logout event) I am talking
about. You're going to have to look for that feature in the .Net Framework.
 

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

Top