detect and close a modal dailog in c#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TGVuaTIwMDA=?=

    detect and close a modal dailog in c#

    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
  • =?iso-8859-1?Q?H=e4rry=20Marcel?=

    #2
    Re: detect and close a modal dailog in c#

    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
    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

    Comment

    • =?Utf-8?B?TGVuaTIwMDA=?=

      #3
      Re: detect and close a modal dailog in c#

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

      Leni

      "Härry Marcel" wrote:
      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
      >
      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
      >
      >
      >

      Comment

      Working...