Results 1 to 5 of 5

Thread: keeping an mdi child on top

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    Unhappy

    how do i keep an mdi child form on top of other mdi children. I have tried the api setorder function and it didn't work.

    The thing i have is two froms side by side. one is a menu form and the other is a status form. however, they are joined and are supposed to look like one and a part of the mdi form. from the menu form you can load a dialog window for doing some tasks. this window is indipendant from the others. but when you click on the mdi form behind, it brings forward only one of the two other child forms hiding half of the dialog form. it looks very cheep and un professional.

    i have also tried making them as independant forms (not children) and hiding the task bar entry. but there is a bug in VB and when you call the message box function, the form is hidden while the message is displayed, then the dialog is displayed again. this makes the screen flash and looks rubbish.

    If you have any suggestions on how to stop the other forms coming in fron of my dialog forms or how to stop the message box hiding the dialog then your more then welcome.

    help!

    cheers
    Craig

  2. #2
    Addicted Member Babbalouie's Avatar
    Join Date
    Jan 2001
    Location
    On the bright, blue sea...
    Posts
    197
    You can try setting the ZOrder property of the forms to the order you want them displayed...
    Building A Better Body Albeit Left Out Under Intense Extrapolation

  3. #3
    Guest
    Try this:


    Code:
    Private Sub MDIForm_LostFocus()
        ZOrder
    End Sub

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    Unhappy

    the mdi form dows not have the lost focus event

    the mdi form never loses focus either because the forms are children to the mdi.

    cheers
    craig

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    Unhappy

    zorder problem

    i tried the zorder method but the trouble is i have to put it on the listbox getfocus event because the actual sidebar form get focus doesnt work because focus is instantly transferred to the list box.

    this list box is used when double clicked to restore the minimised child window. however, because the zorder method is in the getfocus, the child window is restored but then hidden because the zorder method is called.

    how can i get round this problem?

    i've attatched the sidebar form here
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width