Click outside form
-
Hi, From the main form of a Windows application I am creating a modal dialog (using
ShowDialog
). Is there any way I can detect when the user clicks outside the child form? It flashes a bit so I think it should have some sort of event behind. I have interceptedDeactivate
but it seems that it's not the one.
"la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"
-
Hi, From the main form of a Windows application I am creating a modal dialog (using
ShowDialog
). Is there any way I can detect when the user clicks outside the child form? It flashes a bit so I think it should have some sort of event behind. I have interceptedDeactivate
but it seems that it's not the one.
"la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"
AFAIK, you can't. This is the way modal dialogs works. Why do you want this ?
-
AFAIK, you can't. This is the way modal dialogs works. Why do you want this ?
N a v a n e e t h wrote:
Why do you want this ?
I want to destroy the child. I have tried by calling the
Show
method but it fails when a modal child creates a modeless child and the user clicks on the main form :(
"la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"
-
N a v a n e e t h wrote:
Why do you want this ?
I want to destroy the child. I have tried by calling the
Show
method but it fails when a modal child creates a modeless child and the user clicks on the main form :(
"la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"
Bogdan Rechi wrote:
I want to destroy the child
Child ? Do you mean the modal window ? and you want the control back to Parent window ? Why don't you have a close button for your child ?
-
Bogdan Rechi wrote:
I want to destroy the child
Child ? Do you mean the modal window ? and you want the control back to Parent window ? Why don't you have a close button for your child ?
N a v a n e e t h wrote:
Do you mean the modal window ?
No, the configuration is: main form -> modal child -> modeless child, and I am clicking outside the modeless, outside the modal, and inside the main form. I would like to intercept the click and make the modeless disappear. It's a kind of tooltip :)
"la dolce ossessione degli ultimi suoi giorni tristi, Venezia, la vende ai turisti"