MSFN Forum: always on top - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

always on top Rate Topic: -----

#1 User is offline   Cyber Axe 

  • Geek
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 13-December 03

Posted 21 August 2005 - 01:46 PM

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 form

ive 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 top

anyone know how to make children always ontop of the parent regardless of parents settings? or are there any z-index type parameters around?


#2 User is offline   dman 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 717
  • Joined: 01-February 05

Posted 22 August 2005 - 04:18 PM

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


#3 User is offline   Cyber Axe 

  • Geek
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 13-December 03

Posted 24 August 2005 - 08:22 PM

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 that

what’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

#4 User is offline   dman 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 717
  • Joined: 01-February 05

Posted 25 August 2005 - 08:46 AM

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

This post has been edited by dman: 25 August 2005 - 08:49 AM


#5 User is offline   Cyber Axe 

  • Geek
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 13-December 03

Posted 25 August 2005 - 04:28 PM

thats exactly what i wanted to do thanks (i suck at explaining what i am trying to achieve most of the time)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy