-
I'm having a problem with a SIMPLE proceedure...
The API documentation I've found states...
"HWND_TOPMOST = -1
Make the window topmost (above all other windows)
permanently."
...And in all the post I've read, this argument
seems to work when calling SetWindowPos to keep my
Main Form Always on Top.
I've placed the call in my Form_Load, and it doesn't
work. It begins initially on top, but NOT permanently,
ther widows are allowed to be placed over it. I have even
ncluded the flag... SWP_NOZORDER so as not change the
indow's position in the Z-order.
What am I missing?
-Serp
-
take a look at the second half of this page..
http://www.vb-world.net/tips/tip4.html
-
No Error
I've done that and get a return value of 1. No error.
Not on top permanently.
Dim errr As Long
errr = SetWindowPos (Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
'errr = 1
?
-Serp
-
>> I've placed the call in my Form_Load, and it doesn't
work. It begins initially on top, but NOT permanently,
ther widows are allowed to be placed over it. I have even
ncluded the flag... SWP_NOZORDER so as not change the
indow's position in the Z-order.
Uhm, dood... that's messed up. You're trying to fix the window at the top of the Z-Order (HWND_TOPMOST), but then you specify to ignore the Z-Order parameter (SWP_NOZORDER).
-
I was under the impression that the flag swp_nozorder kept
the window at the top of the Z-order...
...and therefore kept it at the top...?
"SWP_NOZORDER = &H4
Do not change the window's position in the Z-order. "
- http://www.vbapi.com/ref/s/setwindowpos.html
-Serp
-
...But you are right, it is a flag to ignore
the Z-order thus counteracting everything I was trying
to do. (And ruining my Master plan to take over the World!)
result = InsertLaugh LAUGH_LONG, 0, LAUGH_EVIL, EVIL_FLAGS
Thanks for the clarification!
-Serp