Cyber Axe Posted August 21, 2005 Share Posted August 21, 2005 i want to make my main form always on top but have all child dialogs and forms and message boxes always on top of the main formive got all my child forms/dialogs set to top most but if i set topmost for the main form then its what ever is active thats on topanyone know how to make children always ontop of the parent regardless of parents settings? or are there any z-index type parameters around? Link to comment Share on other sites More sharing options...
dman Posted August 22, 2005 Share Posted August 22, 2005 If you are planning this for your editor please put toggle to turn this behavior off... many people find it extremely annoying.In answer to question, try making main form "IsMdiContainer" true, then when launching child form, set MdiParent to main form. I.E.Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Form2.MdiParent = Me Form2.Show()End Sub Link to comment Share on other sites More sharing options...
Cyber Axe Posted August 25, 2005 Author Share Posted August 25, 2005 I tried that and it didn’t work, though is an mdi container not a window that opens all windows within the main window and can’t be moved outside it? Because I don’t want to do thatwhat’s I am trying to do is make the main form "second from top" more like so other things that are topmost such as dialogs and such are always on top but the main form is always on top of other apps though it doesn’t seem to be possible Link to comment Share on other sites More sharing options...
dman Posted August 25, 2005 Share Posted August 25, 2005 (edited) Yes that is MDI Container. All child forms contained in main form. Visual Foxpro has a property "Desktop" to allow you to move child forms outside of the main window, but I haven't found equiv for .NET.I think "AddOwnedForm" may be closer to what you want then. Like the find box in notepad that is not modal but floats over the main form? That is what you are going for I guess.Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.AddOwnedForm(Form2) Form2.Show()End Sub Edited August 25, 2005 by dman Link to comment Share on other sites More sharing options...
Cyber Axe Posted August 25, 2005 Author Share Posted August 25, 2005 thats exactly what i wanted to do thanks (i suck at explaining what i am trying to achieve most of the time) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now