[英]Why Does ShowDialog Crash in MonoDevelop?
I have a trouble building and running my working C# project under MonoDevelop. 我在MonoDevelop下构建和运行我正在运行的C#项目时遇到了麻烦。
Any call of OpenFileDilog.ShowDialog()
shows me a window with a proper title, but completely blanc. 任何OpenFileDilog.ShowDialog()
调用都会向我显示一个具有正确标题的窗口,但完全是空白的。 The executive waits for a while and than crashes. 执行官等待一段时间而不是崩溃。
I also have another C# project build in the same MonoDevelop enviroment, that works fine. 我还在同一个MonoDevelop环境中构建了另一个C#项目,工作正常。 Well, not that fine, but at least OpenFileDialogs doesn't lead to crash. 好吧,不是那么好,但至少OpenFileDialogs不会导致崩溃。 So I'm a little bit puzzled here. 所以我在这里有点困惑。 Can it be project specific? 它可以是项目特定的吗? What should I do to avoid it? 我该怎么做才能避免它?
Upddate: It works the same way with any modal form. 更新:它与任何模态形式的工作方式相同。 So It's not OpenFileDilog
, it's ShowDialog()
. 所以它不是OpenFileDilog
,它是ShowDialog()
。 And it might have something to do with some other windows open by ShowDialog caller. 它可能与ShowDialog调用者打开的其他窗口有关。
So. 所以。 I have a form, which opens some other forms with Show()
, and then tries to open another window with ShowDialog()
- and goes then as descibed above. 我有一个表单,用Show()
打开一些其他表单,然后尝试用ShowDialog()
打开另一个窗口 - 然后按照上面的描述进行操作。
Some details: 一些细节:
Mac OS X 10.6.8 (10K594) Mac OS X 10.6.8(10K594)
Mono 2.10.6 单声道2.10.6
MonoDevelop 2.8.5 MonoDevelop 2.8.5
我可以确认,将FormBorderStyle
设置为System.Windows.Forms.FormBorderStyle.FixedToolWindow
在某些情况下会在Mono中生成崩溃(这时我从具有FixedToolWindow
的对话框中打开MessageBox
)。
Seems to be a bug in Mono. 似乎是Mono中的一个错误。 My other non modal windows had FormBorderStyle
set to FixedToolWindow
. 我的其他非模态窗口将FormBorderStyle
设置为FixedToolWindow
。 As soon as I set it back to Sizable
, everything works normal. 一旦我将它设置回Sizable
,一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.