Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Form1使用 Form2.ShowDialog()打开Form2 。在Form2中打开了一个文件对话框。当文件浏览器关闭时,Form2 也关闭(因为我猜是触发了 DialogResult)
我似乎无法通过搜索找到解决方案,也许是因为我不知道要搜索什么。那么在没有Form2关闭的情况下实现这一目标的首选方法是什么?
显然这不是我认为的默认行为。form2 中按钮的 DialogResult 属性确实将其值设置为 OK,我不知道。将此设置为无解决了这个简单的问题。谢谢您的帮助 :)