title: C# Close child window from another process
body: <p>I'm writing an application that latches on to another, which I don't have the source code for, but there's a certain thing that makes it display a .NET Framework exception message.</p>
  
  <p>I can detect with my code when it will open, and I want to get its handle and close it. Sometimes this child window takes the title from the main window, so I can't rely on that to find its handle.</p>
  
  <p>An image of the child window in question:</p>
  
  <p><img src="https://i.stack.imgur.com/fMNpA.png" alt="image"></p>