[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

Always on Top

I have an application that consists soley of one form. I would like to add the option to make the window always on top. I have read other questions and tried using the SetWindowPos API. However, it doesnt exactly do what i want. If my app is running, and then I run another application, like notepad, and maximize notepad my application gets covered and therefore is not always on top. I want something like what happens when you choose Always on Top in Winzip. Winzip loses focus, but will never get covered and you can give it focus simply by clicking on it. Does anyone know how to do what im describing?

Thanks in advance.
0
GreatOne
Asked:
GreatOne
1 Solution
 
kponderCommented:
Have you tried compiling the applicaton and running from the exe? The SetWindowPOS call does not work in the design environment.
0
 
KurvyCommented:
Kponder

SetWindowPos does work in the design environment

GreatOne
 in the call to setwindowpos make sure that the value of hwndinsertafter is set to -1 this forces it up as the topmost window untile the window is closed

Kurvy
0
 
GreatOneAuthor Commented:
Kurvy,

That did the trick. Thanks for the help
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now