Keep window on top and steal focus in WinForms

I struggled with a similar problem for quite a while. After much experimentation and guessing, this is how I solved it:

// Get the window to the front.
this.TopMost = true;
this.TopMost = false;

// 'Steal' the focus.
this.Activate();

Leave a Comment