VB.NET: Combined Form

toytoy

Well-known member
Joined
Jul 16, 2004
Messages
46
Programming Experience
1-3
[font=verdana, arial, helvetica]Hi

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

say you put that set of button on the left side of the form...
and when you click one of the buttons (that button will trigger and go to form2) , the other half of the form will go to form2..
but that set of button will still remain as usual...

Is it possible to do that?

if can how?

Thanks
[/font]
 
You can accomplish this with MDI (Multiple Document Interface) forms.
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). Here's example code for one of the buttons:

VB.NET:
objForm = New Form2()
objForm.MdiParent = Me
objForm.Show()
objForm.Dock = DockStyle.Fill
 
How to you 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 way to deal with this...

And how did you 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
 

Attachments

  • Form.zip
    32.5 KB · Views: 74
Last edited:
Back
Top