How to make a Messagebox (app) modal or not

The question:
When I quit the modeless dialog, I display, during the Queryclose method, a textbox warning with SELF as Owner : Great  : The Textbox is modal for the modeless dialog but NOT for the TopAppWindow !?!?

Possible Error :
I can reach some items in the menu (or toolbar) and an error could happen...


The answer:
Textbox uses the normal Windows MessageBox. You can set styles to make it System Modal or AppModal:

MB_APPLMODAL
MB_SYSTEMMODAL
MB_TASKMODAL

Geef feedback:

CAPTCHA image
Vul de bovenstaande code hieronder in
Verzend Commentaar