我正在努力确保弹出窗口显示如下:
ChildWnd wnd = new ChildWnd(); wnd.ShowDialog();
如果父窗口也是最顶层的,则也是最顶层。
为什么我不能这样做?
partial class ChildWnd : Form { public ChildWnd() { InitializeComponent(); this.TopMost = this.Parent.TopMost; //Why can't I use this? } }