tag:blogger.com,1999:blog-993393844516183990.post6809870851962930380..comments2024-03-16T11:51:08.225-07:00Comments on Drive AutoCAD with Code: Showing and Closing Modeless Form/Dialog Box With System.Windows.Forms.FormNorman Yuanhttp://www.blogger.com/profile/09350392399498834066noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-993393844516183990.post-42708492397243646942020-08-18T12:12:47.045-07:002020-08-18T12:12:47.045-07:00No, I do not know there is simple/easy way in Auto...No, I do not know there is simple/easy way in AutoCAD .NET API to do that. Also, I do not think it makes sense to close modeless window while the focus in on AutoCAD's main window by hitting Esc, at least not how user expects when using Window desktop application/AutoCAD. <br /><br />However, you might want to try to handle Application.PreTranlateMessage event and use the raw Widows Message to see if use hits the Esc key, and if yes, you could then go ahead to find if the said modeless form is visible, if yes, hide it, or close it. Just a thought.Norman Yuanhttps://www.blogger.com/profile/09350392399498834066noreply@blogger.comtag:blogger.com,1999:blog-993393844516183990.post-35970674931769204232020-08-17T15:04:43.038-07:002020-08-17T15:04:43.038-07:00Hi Norman,
I'd like to know if you know how t...Hi Norman,<br /><br />I'd like to know if you know how to close the modeless form when the Escape key is pressed while current focus is on the drawing?<br /><br />Thanks.wayneZhttps://www.blogger.com/profile/15836904504129026283noreply@blogger.com