Search code examples
c#winformsforeground

How to create a c# windows form that keeps in the foreground of the application


In my C# 2.0 application, I want to have a find/replace windows form which keeps in the foreground of the application, even when I click on the main form. You will maybe know these sorts of forms from Notepad++ and that's exactly how I also want my forms here.

I tried the obvious "TopMost = true", but then the form is in front of all the windows on my computer and not only in front of my application window.

Is there any way I can make such forms?


Solution

  • Pass the parent (main) form to the Show method.