Windows Service with Form running before logoff.

G

Guest

I have a Windows Service that should pop a windows form right before logoff,
for the user to enter some information.
I got things working fairly well except that the user does not get to see
the form before logoff. But I know that it run properly because when I log
back in the form is there and works fine.
So the form opened and run, but windows was already in the "logoff" screen
with no desktop showing, so I missed the form.
Is there any way for a Service to capture the logoff before windows actually
logsoff? Or is there any better way to pop a form that the user needs to fill
out before they logoff?

Thanks
 
M

Mr. Arnold

fhunter said:
I have a Windows Service that should pop a windows form right before
logoff,
for the user to enter some information.
I got things working fairly well except that the user does not get to see
the form before logoff. But I know that it run properly because when I log
back in the form is there and works fine.
So the form opened and run, but windows was already in the "logoff" screen
with no desktop showing, so I missed the form.
Is there any way for a Service to capture the logoff before windows
actually
logsoff? Or is there any better way to pop a form that the user needs to
fill
out before they logoff?

This link may give an example to implement something.

http://www.codeproject.com/csharp/systemeventshandler.asp

The Windows application should be doing this if possible to prevent logoff,
until data has been entered in the application.

Maybe you can do something with the Windows O/S Group Policy to run the
program during logoff. I think you can run a logoff script using a Group
Policy, use Google look it up.

A Windows Service application popping-up some Windows form should not be in
the picture, IMHO.
 
G

Guest

I think that article might help. Thanks.

I did try this as a script and I got the same problem. That is why I gave
the service a try. It seemed easier to install and uninstall.

I am curious, why do you think that: "A Windows Service application
popping-up some Windows form should not be in the picture" ?
 
M

Mr. Arnold

fhunter said:
I think that article might help. Thanks.

I did try this as a script and I got the same problem. That is why I gave
the service a try. It seemed easier to install and uninstall.

I am curious, why do you think that: "A Windows Service application
popping-up some Windows form should not be in the picture" ?

This is my take on a NT Service application, below. But that's not to say
that a Windows application cannot communicate with a NT Service
application.. But have a NT service application that it's sole purpose is to
pop a screen to the user, which in your case, may be too late, I would find
other means.

That's just me. It's your solution and you do what you have to do to make it
work.

http://www.commsoft.com/services.html
 

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