title: can not close window with the x button disabled in the upper right corner
body: <pre><code>int result= Win32Api.SendMessage(intPtr, Win32Api.WM_CLOSE, 0, 0);
  Win32Api.SendMessage(intPtr, Win32Api.WM_COMMAND, 0, 0);
  Win32Api.DestroyWindow(intPtr);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fvx2G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fvx2G.png" alt="window image"></a></p>
  
  <p><img src="https://i.stack.imgur.com/BXFs0.png" alt="C# Call win32"></p>
  
  <p>The handle is 000A0274 as shown</p>
  
  <p>This pop-up box is opened by autocad. Another C # program obtains the handle to this window and uses win32 api to close the window</p>