CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: New comer

  1. #1
    Join Date
    Jul 2001
    Location
    India
    Posts
    2

    New comer

    Hello
    Iam new to the app dev in vb.I need to develop an MDI application with six child windows in it.
    I would like the app to look exactly like a VB IDE.with a proj explorer,code window and some other tool windows.Iam unable to get them in palce.Any suggestions abt how do i proceed with this ?
    TIA
    Sri charan


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: New comer

    You will need to determine where each form needs to come, and how large they must be. In the example given, I place 1 form on the left (which has the entire height of the screen, 1 at the bottom, 3 at the right side, and 1 in the middle

    private sub ReArrangeWindows()
    dim lH as long 'height
    dim lW as long 'width
    lh = frmMain.ScaleHeight ' frmMain is the MDI form
    lw = frmMain.ScaleWidth

    form1.left = 0 ' form1 is the left form
    form1.top = 0
    form1.height = lh
    form1.width = lw / 5

    form2.left = form1.width ' form2 is the form at the bottom
    form2.top = lh / 5 * 4
    form2.height = lh / 5
    form2.width = lw / 5 * 3

    form3.left = lw / 5 * 4 ' form3 is the top form at the left
    form3.top = 0
    form3.height = lh / 3
    form3.width = lw / 5

    form4.left = lw / 5 * 4 ' form4 is the middle form at the left
    form4.top = lh / 3
    form4.height = lh / 3
    form4.width = lw / 5

    form5.left = lw / 5 * 4 ' form5 is the bottom form at the left
    form5.top = lh / 3 * 2
    form5.height = lh / 3
    form5.width = lw / 5

    form6.left = lw / 5 ' form6 is the middle form
    form6.top = 0
    form6.height = lh / 5 * 4
    form6.width = lw / 5 * 3

    End Sub




    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Jul 2001
    Location
    India
    Posts
    2

    Re: New comer

    Tom,
    thanx a lot for your reply but,I wanted to know how the windows appear as if they are together,like, the proj explorer and properties windows in the vb ide.(those appear as if they are of same form)
    TIA
    Sri charan


  4. #4
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: New comer

    You are talking about Dockable forms. Go to Planet-Source-Code.com/vb and search on "Dockable" (without the quotes of course).
    Also try FreeVBCOde.com and MSVP.org for examples of creating DOckable forms.

    John G

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

Featured