Results 1 to 15 of 15

Thread: VB.NET: Combined Form

  1. #1

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230

    VB.NET: Combined Form

    Hi

    Has anyone come across a form whereby a set of button is statically station in one side of the form....

    I take this website as example:

    http://www.dualbrain.com/snaps/albumview.jpg
    http://www.dualbrain.com/snaps/coverartview.jpg
    http://www.dualbrain.com/snaps/playlistview.jpg
    http://www.dualbrain.com/snaps/trackview.jpg

    Whenever you click on any of the buttons, it will trigger another form and display it into your form....but the buttons will still remain in your form..

    I heard from my friends that MSM Messager also make use of these and some sort like can make these button appear in every form...only part of the form changes accordingly everytime...

    Thanks
    Last edited by toytoy; Oct 2nd, 2004 at 11:36 AM.

  2. #2

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    If can be done....

    let me know...

    Thanks

  3. #3
    Addicted Member
    Join Date
    Sep 2004
    Posts
    133
    My guess is that you will need a custom control and put it on each of the forms......

  4. #4

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    you mean i have to put this set of button in every form....but isn't it a waste of time....

    you means it can't be solve....

  5. #5

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    Hi...

    i have this idea after i browse through the forum....

    I saw one of the threads that have this idea of overlapping each form using tab controls..
    http://www.vbforums.com/showthread.p...&highlight=tab

    Can the treeView be replace by buttons...

    So that only each form is change everytime when the button is click...

    Thanks

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Sure just put a panel where the treeview is now and then stick the buttons on the pabel.

  7. #7

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    how did you actually hide all the tab buttons and show only one layout without any tab.....

    And when i delete the treeView, i can't really insert another panel into the where the treeView position is...Because the tab control cannot be moved or resize..

    How to solve...

    Thanks
    Last edited by toytoy; Oct 3rd, 2004 at 01:36 AM.

  8. #8
    Addicted Member
    Join Date
    Apr 2004
    Location
    Lagos, Nigeria
    Posts
    215
    I've done this a couple of times. There are some basic steps you need to follow to accomplish it.

    1. Create a form with a panel control docked to the left of the form.
    2. Create a UserControls per different screen [or UI sections].
    3. When a particular button is clicked, dynamically load the coresponding UserControl and set its Dock property to Fill, then remove any previously loaded UserControl.

    I guess you get the trick. I'm out of reach of my development machine, if not, I would have post you some codes.

  9. #9
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I said how to hide the tabs in the post before the attachment in the other thread and it should be in the code as well.

    "You could also use a tab control and at runtime move the Location.Y to something like -22 so it doesn't show the tab headers. It helps to set it to flat tabs too."

    Also to add the panel for the buttons you can change the docking on the tabcontrol and then set it back again after you add the other panel.

  10. #10

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    ok... I get the message..

    Thanks
    Last edited by toytoy; Oct 3rd, 2004 at 08:38 PM.

  11. #11

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    Hi...Edneeis

    You say that you have post the hide the tabs in the thread before...........

    But i could not find it when i search the whole forum..
    did you put it under the Visual Basic section...

    Anyway I could only find these useful links about the tab:

    1) Remove tab at runtime
    http://www.vbforums.com/showthread.p...hlight=Edneeis
    2) Tab control click event
    http://www.vbforums.com/showthread.p...hlight=tabpage
    3) making an entire tab invisible
    http://www.vbforums.com/showthread.p...&highlight=tab
    Last edited by toytoy; Oct 4th, 2004 at 11:22 PM.

  12. #12
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Originally posted by Edneeis
    "You could also use a tab control and at runtime move the Location.Y to something like -22 so it doesn't show the tab headers. It helps to set it to flat tabs too."
    Its the second to last post in the thread you mentioned:
    http://www.vbforums.com/showthread.p...&highlight=tab

    I also quoted the line in my post and it is quoted again above.

  13. #13

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    oh.....

    human mistake...

  14. #14
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    It's all good.

    Somethings seem like they'd be easiler to explain in voice/person.

  15. #15

    Thread Starter
    Addicted Member toytoy's Avatar
    Join Date
    Jul 2004
    Posts
    230
    I have found a better way from other forums using MDI (Multiple Document Interface) forms...

    Here are the steps:

    Create a mainForm and set it's IsMdiContainer property to True. Then create a panel in the mainForm and set it's Dock property to Left. Add the Buttons to the panel.

    The Child form(s) (form2 as you called it) should have their FormBorderStyle set to None. When the Child forms are opened, set their Dock property to Fill (along with setting the MdiParent to the MainForm).

    Do you guys know how to exactly adjust the space to put inside the child form so that it can be view in the parent form instead of out of the scope from the parent form...

    I found a solution to this is to increase the form size of the child...
    That means the parent form size must not be larger than the child size ...

    Is there any other ways to deal with this...

    And how to change the colour for the parent form...

    I can only change it for the child forms...the parent form will remain the same colour...

    Thanks
    Attached Files Attached Files
    Last edited by toytoy; Oct 5th, 2004 at 05:18 AM.

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