Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mdi child question

Status
Not open for further replies.

vblink

Programmer
Joined
May 15, 2003
Messages
2
Location
CA
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.

hope this helps
Andreas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top