Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing MsgBox through code

Status
Not open for further replies.

Galyl

Programmer
Nov 21, 2001
16
0
0
ZA
Can someone tell me if it is possible to close a MsgBox using code and assigning a default return value?
 
My first idea would be to use FindWindow and SendMessage APIs to get the hWnd of the message box and then use WM_CLOSE to close it. However it looks like the message box HAS to be either SystemModal or ApplicationModal so the code to close the MsgBox couldn't run until the message box was closed.

I'm sure someone else will prove me wrong though.....

elziko
 
Thnks, Ive received a reply on how top do it
 
Well,

would you mind sharing?

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top