Results 1 to 10 of 10

Thread: [Resolved] vb6 - weird results with MDIChilds

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Resolved [Resolved] vb6 - weird results with MDIChilds

    the forms are resizing and not showing up as there original size and the menu's are not showing up on the forms but the MDIForm
    Attached Images Attached Images  
    Last edited by psychotomus; Jul 12th, 2008 at 08:21 PM.

  2. #2
    Lively Member
    Join Date
    Nov 2007
    Location
    Rochester, NY
    Posts
    111

    Re: vb6 - weird results with MDIChilds

    The menu's go to the parent form by default, I'm not sure how to fix that, never needed to.. I'll look into it though. But the sizing can be done when the form is loaded eg.

    Private Sub MdiForm1_Load()
    Form1.Width = 123
    Form1.Height = 1234
    End Sub

    That's given that the form loads on mdiform load, otherwise use it in the control you're using to load it.
    Please use the search function prior to posting a question and see if someone's already answered it.
    -If I helped you, please rate me, as I'd do the same for you =)
    -Remember to select the Resolved option for your post when you've gotten the answers you need.

  3. #3
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Indiana
    Posts
    295

    Re: vb6 - weird results with MDIChilds

    If you're only going to show one child form at a time, you can have it maximized. That way it will be full size just below your parent form's menus.

  4. #4
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: vb6 - weird results with MDIChilds

    Quote Originally Posted by psychotomus
    the forms are resizing and not showing up as there original size...
    Change the form's BorderStyle property to "Fixed Single".
    Quote Originally Posted by psychotomus
    ...and the menu's are not showing up on the forms but the MDIForm
    This is default behavior for a MDIForm. If you want to change that, do a search for "MDI negotiate menus". Any solution is going to require some sort of workaround.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: vb6 - weird results with MDIChilds

    still can't figure out how to add menu's to MDI Childs. I really need them -_-

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: vb6 - weird results with MDIChilds

    Quote Originally Posted by psychotomus
    still can't figure out how to add menu's to MDI Childs. I really need them -_-
    You can't actually do it with a MDIchild but you can fake it. In this example Form1 is a normal form,

    Code:
    Option Explicit
    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    
    Private Sub MDIForm_Load()
        SetParent Form1.hWnd, MDIForm1.hWnd
        Form1.Show
    End Sub

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: vb6 - weird results with MDIChilds

    the menu's still don't show up on the original form...

  8. #8

  9. #9

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: vb6 - weird results with MDIChilds

    o wow =)

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