detect and close a modal dailog in c#

  • Thread starter Thread starter Leni2000
  • Start date Start date
L

Leni2000

Hi, I would like to write a c# application. to detect if a modal dialog opens
on another application, (e.g. notepad.exe save changes dialog when you click
exit ) and auto cancel it. How do I detect the modal dialog opening?

Thanks for your help
Leni
 
Hi Leni

First you have to know the name of the application you want to "control"
second the window name on which you want to click.
There is a Program called "spy.exe" for that. After you "know" your window
is open i would deal with sendkeys.

btw. There is a freeware application to do such things -> AutoIT if you 've
not the time to reinvent the weel.

Cheers Marcel
 
Thanks Marcel, I'll have a look at that.

Leni

Härry Marcel said:
Hi Leni

First you have to know the name of the application you want to "control"
second the window name on which you want to click.
There is a Program called "spy.exe" for that. After you "know" your window
is open i would deal with sendkeys.

btw. There is a freeware application to do such things -> AutoIT if you 've
not the time to reinvent the weel.

Cheers Marcel
 
Back
Top