Jump to content

How to cancel modal form closing in the OnClose event by using Action := caNone?


Nadya

Recommended Posts

Hi!

I have modal forms in application. In the OnClose event I need to cancel form closing.

I check conditions and set Action := caNone but it doesn't work. Form closes anyway. I've made a testcase for demonstrate.

Testcase - ModalWinOnClose.zip

To check out - please press the "Show nonmodal form 1" button on main form, then press the "Show modal test form" button to call modal form.

If checkbox "Can close form" not checked - form should not be closed but Action := caNone is ignored

What's wrong?

Thank you in advance!

Link to comment
Share on other sites

  • 5 months later...

Did anybody reply to you in another thread? Because I don't see any answer in this thread.

I am wanting the same thing. IE: To be able to STOP the form from closing...

1. Client side keeps form displayed

2. Server side does NOT continue execution to the line after the ShowModal line of code.

 

Thanks

Davie

Link to comment
Share on other sites

Does NOT work for me.

the line of code that contains the ShowModal method (blocking until form closes) falls down to the next line of code even when I use the caNone.

If the form truely didn't close, then it shouldn't continue execution after the ShowModal line of code... right?

Davie

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...