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.

Laurent Etiemble
  • 27,111
  • 5
  • 56
  • 81
ad da
  • 13
  • 2

2 Answers2

0

If we are talking about wfp, try setting the property ShowActivated="False"

Alberto
  • 15,626
  • 9
  • 43
  • 56
0

One way is to use Focus() or your parent form.

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

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

This will keep your Form1 on top when the second spawns.

gunr2171
  • 16,104
  • 25
  • 61
  • 88