1

I'm trying to make a form that will be on top of all the windows and also when it shows it self it won't take focus from other windows.

I did that the form will be ontop of the windows:

this.TopMost = true;

But I can't figure out how to prevent the form from taking focus while displayed.

4

2 回答 2

0

如果我们在谈论 wfp,请尝试设置属性ShowActivated="False"

于 2013-09-21T15:29:22.627 回答
0

一种方法是使用Focus()或您的父表单。

//create a spawn a child form
Form2 f2 = new Form2();
f2.Show();

//give your parent form the focus
this.Focus();

当第二个生成时,这将使您的 Form1 保持在顶部。

于 2013-09-21T15:43:58.527 回答