The problem I have this that we have written a service/application that monitors usage and controls access using a booking system to around 3000 workstations, but some users have found that by killing the service this then stops the service from logging them out when the booked time has elapsed
I supposed then answer is testing the current user who is tiring to exit the service and testing the system exit status.
Looping on the on stop would work if you could tell if the workstation is in a state of shutting down forced or not.
Every .Netframework leaves a key in:
For example if the machine has 2.0 Framework installed then there will be:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0" key in the registry
try this code:
if (Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\.NETFramework\\policy\\v2.0") != null)
but that will work fine with the if statement, not with the preprocessor directive #if.
Sorry for the mistake. I fixed my message though. I will look for it, if I find something I'll let you know.
But, can you give me a hint why you want it in a preprocessor directive rather than ordinary if statement?
Hi. I have a winform (with fade-in and fade-out effect) and I run it on VS 2003 and works great. But when I use VS 2005, the winform appears like with flicks, it's like it had a rendering problem. The example works great with VS 2003, but I have to run in in VS 2005.