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

Windows Service with Form running before logoff.

P: n/a
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

Jul 11 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"fhunter" <fh*****@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.com...
>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/sy...ntshandler.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.

Jul 11 '07 #2

P: n/a
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" ?
"Mr. Arnold" wrote:
>
"fhunter" <fh*****@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.com...
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/sy...ntshandler.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.

Jul 11 '07 #3

P: n/a

"fhunter" <fh*****@discussions.microsoft.comwrote in message
news:AB**********************************@microsof t.com...
>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

Jul 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.