Home All Groups Group Topic Archive Search About

Watch for a specific dialog box and respond to it (close it)

Author
22 Sep 2005 3:07 PM
Stephen Corey
I need to close a certain dialog box that windows will throw up
automatically. How can I watch for it and automatically respond?

Author
22 Sep 2005 3:14 PM
Matt Williamson
Stephen-

I'd probably do a FindWindow/FindWindowEx loop looking for the title or
class name of the window in question and use keybd_event or
sendmessage/postmessage with vk_click or similar constant to dismiss it.

HTH

Matt

Show quoteHide quote
"Stephen Corey" <swc@_NOSPAM_wardandsmith.com> wrote in message
news:%23L5xWd4vFHA.3400@TK2MSFTNGP14.phx.gbl...
>I need to close a certain dialog box that windows will throw up
>automatically. How can I watch for it and automatically respond?
Author
22 Sep 2005 3:27 PM
alpine
On Thu, 22 Sep 2005 11:07:22 -0400, Stephen Corey
<swc@_NOSPAM_wardandsmith.com> wrote:

>I need to close a certain dialog box that windows will throw up
>automatically. How can I watch for it and automatically respond?

Use a timer and the FindWindo API function.

HTH,
Bryan
____________________________________________________________
New Vision Software                   "When the going gets weird,"
Bryan Stafford                      "the weird turn pro."
alpine_don'tsendspam@mvps.org     Hunter S. Thompson - 
Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas