|
-
Jul 12th, 2000, 02:14 PM
#1
Thread Starter
New Member
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
-
Jul 12th, 2000, 02:23 PM
#2
Frenzied Member
take a look at the second half of this page..
http://www.vb-world.net/tips/tip4.html
-
Jul 12th, 2000, 02:39 PM
#3
Thread Starter
New Member
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
-
Jul 12th, 2000, 02:52 PM
#4
Lively Member
>> 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).
- Steve
Real programmers use COPY CON PROGRAM.EXE
-
Jul 12th, 2000, 02:59 PM
#5
Thread Starter
New Member
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
-
Jul 12th, 2000, 03:08 PM
#6
Thread Starter
New Member
...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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|