|
-
Oct 10th, 2000, 09:53 AM
#1
Thread Starter
Lively Member
here an API call for this or something close to this:
Anyone has an idea about how to force a Form
to remain behind all other Forms (i.e. a
background Form).
I tried vbModal and Zorder, but didn't work.
Thank you
0101011001000010
01101111011011100110110001101001011011100110010101110010
-
Oct 10th, 2000, 01:21 PM
#2
Use the SetWindowPos api function.
Code:
Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos"_
(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) As Long
Global Const SWP_NOMOVE = 2
Global Const SWP_NOSIZE = 1
Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Global Const HWND_TOPMOST = -1
Global Const HWND_NOTOPMOST = -2
Usage
Private Sub Form_Load()
ontop& = SetWindowPos (Me.hWnd, HWND_NOTOPMOST, _
0, 0, 0, 0, FLAGS)
End Sub
-
Oct 10th, 2000, 04:18 PM
#3
Thread Starter
Lively Member
Thanks you Matthew!
What is the difference between GLOBAL and PUBLIC?
0101011001000010
01101111011011100110110001101001011011100110010101110010
-
Oct 10th, 2000, 04:44 PM
#4
Global is older and has been superseded by Public, which is newer and is a bit more flexible.
the only reason Global is still around is for backwards compatibility.
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
|