Home All Groups Group Topic Archive Search About

Problem with TopMost Functionality in VB.NET

Author
24 Mar 2006 10:51 PM
Phil Galey
I have a small application, which is to always stay on top.  Another
application, which it is supposed to stay on top of, is QuarkXPress 5.  I'm
using Me.TopMost = True in the Form1_Deactivate event, and it works almost
perfectly.  It always stays on top, except when I click on one of the tools
in the floating tool bar of QuarkXPress.  Anything else in QuarkXPress is no
problem ... document, menus, etc.  But click on anything on QuarkXpress'
floating toolbar, and my VB.NET application says bye-bye.

What event might I use in this situation to stop it from losing it's TopMost
position?  Thanks.

Author
25 Mar 2006 12:00 AM
Armin Zingler
"Phil Galey" <paga***@starcalif.com.nospam> schrieb
> I have a small application, which is to always stay on top.  Another
> application, which it is supposed to stay on top of, is QuarkXPress
> 5.  I'm using Me.TopMost = True in the Form1_Deactivate event, and
> it works almost perfectly.  It always stays on top, except when I
> click on one of the tools in the floating tool bar of QuarkXPress.
> Anything else in QuarkXPress is no problem ... document, menus, etc.
>  But click on anything on QuarkXpress' floating toolbar, and my
> VB.NET application says bye-bye.
>
> What event might I use in this situation to stop it from losing it's
> TopMost position?  Thanks.


What if the other application wants to be topmost, too? Which one is more
topmost? All topmost windows have their own z-order.

Look for "z-order" or "topmost" here:
http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowfeatures.asp


Armin