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 sor开发者_高级运维ts 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?
Pass the parent (main) form to the Show
method.
Instead of calling Show()
on the child form, you could call ShowDialog()
Of course this will be modal and persist to stay in front of the parent form. I.e. you must handle this new popup before you can interact with the parent form again.
精彩评论