473,322 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Windows Service with Form running before logoff.

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
3 2244

"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
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Reader | last post by:
I have an application that allows a user to enter a user name, user password, and the domain or machine name. From this information I would like to verify the user account and password is valid. ...
3
by: Brad Jones | last post by:
Hello, I'm hoping someone can give me some help or guidance here. I'm not sure if this is even the best group to post to for this. Our OEM equipment's software architecture relies heavily on a...
7
by: Mullin Yu | last post by:
if i put the same code at the windows application or console, i can logon to the computer. but, if i put the same code at the windows service and start it, i still can't logon to the machine. ...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
2
by: Eduard Witteveen | last post by:
Dear list, In the corporation, we want to know who is using which computer, and do some phone routing based upon this information. When a user log's uses it's account to login, the phone on the...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
15
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter...
2
by: roberth | last post by:
Hi, I've created a simple Windows Service that starts an .exe with Process.Start(). However, I've noticed that when I logoff from one user account to another the child process (.exe) is shutdown...
1
by: CyberSoftHari | last post by:
I want to get applications running (Showing) in Task bar (and show those applications running) and Cancel windows LogOff, Shutdown, Restart when user try to Click windows LogOff, Shutdown, Restart
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.