I can use API call to make a form that is not a mdichild stays of top of other windows. However the same method does not work with mdichild forms. How can I make mdichild stay on always stay on top?
You could subclass your MDIChild and control visibility in the windowsprocedure, but I don't think that's a good solution.
First of all I would ask, if it has really to be an MDIChild. Because if you don't mind having a normal form I would try something like this:
Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub MDIForm_Load()
Form1.Show
Form2.Show
Form3.Show vbModeless, Me
SetParent Form3.hwnd, Me.hwnd
End Sub
Sure it can't be arranged and so but IMHO i can't imagine any occasion where you would like to do so a topmost window.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.