|
-
Nov 7th, 2000, 03:10 PM
#1
Thread Starter
Lively Member
I need to force a child form to stay on top
until its unloaded or hidden. (vbmodal doesn't
work with child forms)
thank you
0101011001000010
01101111011011100110110001101001011011100110010101110010
-
Nov 7th, 2000, 03:14 PM
#2
Add the following to the LostFocus event of the Form you want to keep on top.
Code:
Private sub Form_LostFocus
ZOrder
End Sub
-
Nov 8th, 2000, 11:40 AM
#3
Thread Starter
Lively Member
0101011001000010
01101111011011100110110001101001011011100110010101110010
-
Sep 27th, 2002, 06:27 PM
#4
Hyperactive Member
I got one 4 ya
How can you make either 2 forms stay ontop of all the others, or just one form stay always behind the others??
Thanx
Visual Basic 6.0 Enterprise
Visual C++ 6.0 Professional
Wak 
-
Sep 27th, 2002, 06:30 PM
#5
PowerPoster
Well
VB Code:
' Declarations
Private Declare Function 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) As Long
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
' Usage
SetTopMostWindow Me.hwnd, True
'*******************************************************************************
' SetTopMostWindow (FUNCTION)
'
' DESCRIPTION:
' SET TO TOP MOST FORM
'*******************************************************************************
Private Function SetTopMostWindow(hwnd As Long, Topmost As Boolean) As Long
On Error GoTo ErrRtn
If (Topmost) Then
SetTopMostWindow = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
Else
SetTopMostWindow = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
SetTopMostWindow = False
End If
Exit Function
ErrRtn:
MsgBox "Error in SetTopMostWindow " & Err & " " & Error, vbExclamation + vbOKCancel
End Function
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 27th, 2002, 06:32 PM
#6
Hyperactive Member
oi, lol
I forgot something, its MDI stylez :P
n i thought I'd make it more tricky (cause i realized it wouldn't work otherwise)
can't use
zorder 1 ( I dont think, cause u can only use it once???)
There 4 forms, and 2 need to always be on top of the other 2, they are all mdi forms. Is it possible?
----------------------------------------
Geeze u reply fast, i push refresh once the page loads and I already had a massive reply.
Visual Basic 6.0 Enterprise
Visual C++ 6.0 Professional
Wak 
-
Sep 27th, 2002, 06:33 PM
#7
PowerPoster
Well
Sure, if they are not MDI Children...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 27th, 2002, 06:37 PM
#8
Hyperactive Member
mmm
Maybe I can solve this a different way...
Say I have a form, cannot be moved. It is an MDI child.
However I wish to resize it using the little blue resizing handles like the vb environment... Is it possible without creating another form?
(Im not re-creating a vb draw thingo, so don't freak, lol)
ciao
Visual Basic 6.0 Enterprise
Visual C++ 6.0 Professional
Wak 
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
|