Keep form on top of everything - even other apps ?

  • Thread starter Thread starter Rob
  • Start date Start date
Is there a way to keep a form on top of everything - even other apps ?

TopMost = True
 
Hello,

I don't think TopMost = True will do it. In most probability it will keep
your form on top of your current app only.

I think there is an API called SetWindowPos that is used for this purpose. I
used it back in good ol' days of VB not Net.

If you look for the SetWindowPos keyword, you can probably find some
examples on the net.

Regards
Cyril
 
I don't think TopMost = True will do it. In most probability it will keep
your form on top of your current app only.

It works for me (topmost means on top of all apps) under XP 5.1 SP 2 Build
2600, FW 1.1 SP1. But there is this in the .net help files:

"With the Microsoft Windows 2000 operating system, a top-most form always
stays in front of all windows in a given application. In Microsoft Windows
98, a top-most form stays in front of all windows in all applications. For
example, you may want to keep a floating tool window in front of your
application's main window. The TopMost property controls whether a form is a
top-most form. Note that a top-most form will float above other, non–top-most
forms even when it is not active."
 
Hmm... That's weird behaviour :)

Well.. I guess for insurance it might be a good idea to use the API. I have
always used it.

Thanks for the tip AMercer, this is something I didn't know

Regards
Cyril
 

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

Similar Threads


Back
Top