[英]How to click item on first form while having another form open
Example image: 示例图片:
I just want to know how to click something on the parent form while the child is active! 我只想知道在孩子活跃时如何在父表单上单击某些内容!
Why I want it: Users may need to access one dialog while looking at another. 我为什么想要它:用户可能需要在查看另一个对话框时访问一个对话框。
Displaying a form with call: 显示带有呼叫的表单:
new Form2().showDialog();
Will not allows you to click on the form1
. 不允许您单击form1
。
new Form2().show();
Will allow you to click parent form1
. 将允许您单击父form1
。
Suggested by David Pilkington . David Pilkington建议。
I fixed it by going from: 我通过以下方法修复了它:
form.ShowDialog(this);
to: 至:
form.Show(this);
thank you! 谢谢!
quite simply (re-factored) you can use this. 非常简单(重构),您可以使用它。
//Open as dialog
new Form2().showDialog();
//Open as new instance
f2 = new Form2();
f2.Show();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.