CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2001
    Posts
    76

    how to create a program's interface and behave like vb

    i want to know how to realize a program with 3 or more forms ,these forms can
    dock and drag ,they can float.in summary ,it like vb.
    Thanks very much in advance.


  2. #2
    Join Date
    May 2001
    Posts
    34

    Re: how to create a program's interface and behave like vb

    use the
    form.show command in a command button
    eg. 3 forms frm1,frm2,frm3
    put the code in a command button on frm1 (frm1.show)

    -DAVE

  3. #3
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: how to create a program's interface and behave like vb

    Tricky.

    The main form needs to be an MDIForm which you create by selecting Add->New MDIForm option.

    The docking windows need to be MDIChild windows. There is an MDIChild property on the form that you set to True to make this happen.

    To make a form look docked you need to have a picturebox that is docked on the MDI parent and use the SetParent() api call to put the MDI child form inside this picture box. To undock the form call SetParent again to set the parent to be the MDI form.

    Hope this helps,
    Duncan

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  4. #4
    Join Date
    Jul 2001
    Posts
    76

    Re: how to create a program's interface and behave like vb

    first,i appreciate your help very much.
    i am a beginner,i need help very much.i want to realize when a mdichild windows dock(like toolbar widown in vb),other window(like program widown in vb)resize itself.just do it like vb.
    if there is a .zip example, please mail me.that is great.thanks in advance.


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

    Re: how to create a program's interface and behave like vb

    Here you go
    http://www.planetsourcecode.com/xq/A...s/ShowCode.htm

    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)

  6. #6
    Join Date
    Jul 2001
    Posts
    76

    Re: how to create a program's interface and behave like vb

    i am a vb beginner,it is hard to organize these codes for me. I would love to download the source for this but the link the author gave doesn't seem
    to work.i don't know how to do .help!! i need a .zip program.thank in advance



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

    Re: how to create a program's interface and behave like vb

    I tried Cakkies link and had no problems. Try again. If it still does not work go to Http://www.Planet-Source-Code.com/vb and search on "Create a Dockable" (Without the quotes of course) and it will show as the second hit.

    John G

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

    Re: how to create a program's interface and behave like vb

    Just download Winzip or something, it can be found on every corner of the internet. (try http://www.winzip.com)

    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)

  9. #9
    Join Date
    Jul 2001
    Posts
    76

    Re: how to create a program's interface and behave like vb

    first ,i appreciate men who help me,especial Cakkie.
    I think i can't express my meaning exactly.i can link cakkie's url,but i hope the program is a .zip file but copy and paste.
    now i want to know when a form change its size by drag its edge,what event happen?i tried form_resize,but it doesn't work .thank in advance.


  10. #10
    Join Date
    Jul 2001
    Posts
    76

    Re: how to create a program's interface and behave like vb

    hi .i found a good example about docking form.
    &lt;a&gt;http://www.planet-source-code.com/xq...howCode.htm&lt;/a&gt;
    i thank everyone who help me.



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