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.
是否已经有一些我可以使用的属性,例如:
if (this.IsDialog) { DialogResult = ...; } else { //do something else }
或者我应该自己创建这样的属性并将其设置为true在将表单显示为对话框之前?
true
你可以检查一下是否this.Modal属实。
this.Modal