Search Tools Links Login

Always On Top Property At Runtime

Posted: 2019-08-27
By: fabulous
Viewed: 203

Filed Under:

VB6 Custom Controls/Forms/Menus, VB6 Miscellaneous, VB6 Code Cache

Title Uploaded Size
AlwaysOnTop.txt 8/27/2019 9:44:46 AM 850

If you paste this code to your Form will have a new form property which when set to true will keep you window (form) above all other open windows even when it does not have the focus.

One issue with it is that it might work or might not work in the IDE. I've seen both cases. It also does not work for MDI children.

Pay attention to the commented form resize code. If you window can be minimized it will lose the setting so you will need to uncomment the resize code to make sure that it is restored properly. Happy coding.

Special Instructions

This code originally appeared on AndreaVB.com, and has been republished here with the permission of Andrea Tincani.


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.