Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can anyone tell how to close modal window?
I am using domodal() but I don't have any buttons or any controls over that window.
Based on some conditions I want to close that window.

Please let me know if any one knows about this.
Posted
Updated 22-Nov-10 17:49pm
v2

When you open the modal window the code will wait at the point domodal() is called. You can check it before calling domodal() or have the window handle it by itself in the load event.

Good luck!
 
Share this answer
 
Hi,
The modal dialog can be closed using the EndDialog() function or by calling the SendMessage() with WM_CLOSE parameter.And if you want to close the dialog after displaying it for some time with out clicking any control as such, then "timer" can be used for that.

Regards,
Devadutta
 
Share this answer
 
This is a repost (Modal window should get closed without any input from user[^]).
I gave you an answer on your original post, and I added some details on your fake answer (I've seen it only a few minutes ago).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900