TopMost

S

Saurabh

Hi All,

When I set a form to be TopMost, I expected it to be the topmost form within
the application, but when I open some other application, this form is still
on top of the application. Is this the expected behaviour of TopMost
property?

TIA

--Saurabh
 
J

Jan Tielens

From the docs:
A topmost form is a form that overlaps all the other (non-topmost) forms
even if it is not the active or foreground form. Topmost forms are always
displayed at the highest point in the Z-order of the windows on the desktop.
You can use this property to create a form that is always displayed in your
application, such as a Find and Replace tool window.

"of the windows on the desktop" => So I think this is the expected behavior.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
S

Saurabh

Thanks for the input, but I don't see how this can be useful, Ideally the
useful thing would be to have a forma as topmost form within an application.
This raises 2 issues
1) Does anybody know how to do it?
2) Does anybody know the URL to .NET's 'Wishlist'

cheers!!

--Saurabh
 
L

Lloyd Sheen

I think what you want to do is use the me/this keyword in the Show or
ShowDialog. This will ensure that the form will stay on top of the form
listed as the owner in the Show/ShowDialog call.
As an aside the best reason for OnTop is when you want access to some
information and don't want to be constantly going to the navigation bar to
see it. Sort like the good old WinHelp.

Lloyd Sheen
 
S

Saurabh

I think you are talking about the modal dialog. I am very sorry, I forgot to
mention that the dialog is a modeless dialog. If you have seen application
like TextPad, the find / replace dialog remains on top but when you navigate
to other application, its not the topmost window on the desktop. Thats
precisely what I was looking for.

I think I can handle the GotFocus / LostFocus (or equivalent) and change the
TopMost property to true or false and achieve this, but I had expected it to
be built into .NET formas.

--Saurabh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top