Hai all.
In my appliction im having MDI parent form. and i made frm2 as topmost form
But problem is whenever i open some other appliction still that frm2 will come on top.
whenver my application is open or active then only frm2 should be on top.

Thanks

Recommended Answers

All 3 Replies

How did you put form2 on top?

By setting the property of form
i.e form2.topmost=true

To be truthful with you I have never used TopMost before. I tried this code:

Child1.MdiParent = Me
        Child1.Text = "Top Most"
        Child1.TopMost = True
        Child1.Show()

        Child2.Text = "This should be behind"
        Child2.TopMost = False
        Child2.MdiParent = Me
        Child2.Show()

and topmost doesn't work. Click on Child2 and it comes to the front. Other programs come up over the forms. Now if I set the MDI form to topmost=true then the form does stay on top of all other programs. So I am at a loss as why a child form would show up over all other programs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.