Got something to write about? Check out our Article Builder.

Example of forcing a Window to always remain on top

Example of forcing a Window to always remain on top

Submitted By: WEBMASTER
Rating: star (Rate It)



NOTE: Some downloads must be obtained through publishers´s site.
Do you want to get your software listed on this site? Go to our submissions area.

Screenshot

No Image

Details

File Name:
ONTOP.ZIP
Product homepage:
Order page:
Languages:
Unknown
Platforms:
Unknown
Release date:
1/1/1900
License:
Unknown
Size:
1 KB
Price/Fee (US$):
Unknown
Number of downloads:
8708

Comments (2)

Could be better starstar   Posted by: TheChameleon on Wednesday, July 17, 2002

This is the right code for keeping a form on top, but it's not all.
There is a problem when the form is minimized, the form doesn't return to the topmost position.
you must put in the resize form this:

If WindowState = vbMinimized Then
SetWindowPos Me.hwnd, HWND_NOTOPMOST, X, Y, cX, cY, SWP_SHOWWINDOW
Else
SetWindowPos Me.hwnd, HWND_TOPMOST, X, Y, cX, cY, SWP_SHOWWINDOW
End If

one more thing, this doesn't work when the system is in debug mode, only in exe running mode, so don't be suprised if you run it (with F5) and you don't get the result you thought it would give.

hai   Posted on Monday, December 15, 2003

this is fine

Add Your Rating

(Not published)
star
starstar
starstarstar
starstarstarstar
starstarstarstarstar

corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.