I want to make auto logoff while closing the winform without timer access. How do I do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I do not really understand what do you mean by
without timer accessbut you may run a process or a command while the form is closing using theFormClosingevent.If you would like to log off the user when the form is about to close, you may try to use the executable file
shutdown.exeas a process and its argument/lExample
This will start the executable file
shutdown.exeas a new process with its arguments/lwhich means log off the current userNotice that:
FormClosingis fired when the form is about to close. You may stop the form from closing by settinge.CanceltotrueExample
Thanks,
I hope you find this helpful 🙂