How to intercept an Exit event for a Windows Form in VB?
Posted
by Dooms101
on Stack Overflow
See other posts from Stack Overflow
or by Dooms101
Published on 2010-04-07T20:52:44Z
Indexed on
2010/04/07
21:13 UTC
Read the original article
Hit count: 215
When a user clicks on the little red "x" a.k.a. the form close button on the form command bar, what even is activated besides FormClosed()
I know FormClosing() is called, but I cannot really stop the form from closing after my code is run. I want to be able to show a messagebox that asks if the user wants to exit the form or not. Obviously if they click no, I want the form to stay open, how would I do this?
© Stack Overflow or respective owner