If I have a button, "Apply" on the form and the user clicks it and I close
the form in this button click event, then the form closing event fires also
so I don't know which action the user took in the Form Closing event, i.e.,
clicked the button or the control box close. I know I could set a form
scoped variable boolean and set it to true in the button click event then
check it in the control box close event but I was hoping for something a bit
more elegant!
"Crouchie1998" wrote:
Choose the Form's Closing event
You have 'e'. So, you could say:
e.Cancel = True
This means if the user clicks the ControlBox the application isn't closed,
but is handled how you need it. So this in conjunction of the Form_Closing
event is what you need
Crouchie1998
BA (HONS) MCP MCSE