T
Thomas
Hello CF Programmers
I have a question about getting an event when the Form's X button is
pressed.
Due to performance issues, I want to leave the Forms open and used
them again when needed. So I set the MinimizeBox to true. To save data
changes made in the Form, I need to know when the Form's X button is
pressed. Sadly there is no standard event in Form class.
Can somebody tell me how to get notified when the X Button is pressed?
I cannot use the Deactivate event because its also fired when form is
send to background.
I tried to P/Invoke GetWindow to determine if form is sent to
background, but its not working perfectly in all cases.
Can I P/Invoke RegisterHotKey to hook the X Button?
I appreciate your help
Greets,
Thomas
I have a question about getting an event when the Form's X button is
pressed.
Due to performance issues, I want to leave the Forms open and used
them again when needed. So I set the MinimizeBox to true. To save data
changes made in the Form, I need to know when the Form's X button is
pressed. Sadly there is no standard event in Form class.
Can somebody tell me how to get notified when the X Button is pressed?
I cannot use the Deactivate event because its also fired when form is
send to background.
I tried to P/Invoke GetWindow to determine if form is sent to
background, but its not working perfectly in all cases.
Can I P/Invoke RegisterHotKey to hook the X Button?
I appreciate your help
Greets,
Thomas