|
-
Dec 15th, 2001, 11:19 AM
#1
Thread Starter
Junior Member
I can do Always On-Top, but Always *Underneath*?
I'm working on a shell replacement for windows (for fun) and I'd like to have my 'desktop' stay on the bottom. Are there API calls that can manage this feat?
Thanks in advance.
-
Dec 15th, 2001, 11:25 AM
#2
Conquistador
something like:
VB Code:
Private Const HWND_BOTTOM = 1
'Move window Form1 to the upper-left corner of the screen and make
' at appear above all other windows permanently. Note how the function is told not
' to resize the window, so we don't have to worry about the lower-right coordinate.
Dim flags As Long ' the flags specifying how to move the window
Dim retval As Long ' return value
' Do not resize the window, redraw the window in its new location
flags = SWP_NOSIZE Or SWP_DRAWFRAME
retval = SetWindowPos(Form1.hWnd, HWND_BOTTOM, 0, 0, 1, 1, flags) ' move the window
let me know
-
Dec 15th, 2001, 11:34 AM
#3
Thread Starter
Junior Member
Thanks...
I'll give it a shot and see what happens.
-
Dec 15th, 2001, 11:59 AM
#4
Conquistador
good luck
-
Dec 15th, 2001, 01:07 PM
#5
You can try that :
VB Code:
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Sub Form_Activate()
'KPD-Team 1998
'URL: [url]http://www.allapi.net/[/url]
'Set the window position to topmost
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
-
Dec 15th, 2001, 10:52 PM
#6
Conquistador
no
no you can't
that would set the window to the top of the zorder, right at the top
use my code
-
Dec 16th, 2001, 11:03 AM
#7
Humm anyways I didnt make that code, it's AllApi.net!
-
Dec 16th, 2001, 04:33 PM
#8
Conquistador
Yes, but you didn't tailor it to his needs either!
If you are going to post a variation on what is already there, make it specific and helpful, as my example puts it on the bottom - because i fixed it
-
Dec 17th, 2001, 02:36 PM
#9
Chaoticmass: Did you try Da_Silvy's suggestion. I'd be interested in what happened.
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
|