I'm working on a program that'd display a message box when the user is going to be logged off. I've tried the OnExit and OnFormClosing events, but neither of them worked. Does anyone know what even I need?
[editline]08:19PM[/editline]
:wtc: It won't let me change the title.
You mean logging off Windows?
Yeah, I want to prevent that. I'm sorry, it wouldn't let me change the title.
[editline]08:35PM[/editline]
Well, pause it to display a notification.
Have you tried canceling the event on form closing by doing setting FormClosingEventArgs's Cancel property to true?
I don't want to cancel it, I just want to pause the logoff until they click OK on the message box.
A MessageBox in OnFormClosing should work.
that will only create a windows error dialog, also you will run into when does your program closes, if it does it late in the log-off, no luck most of the process's will be unloaded, you might want to work with the windows API instead.
That's fine. All I want is a dialog saying something.
Sorry, you need to Log In to post a reply to this thread.