Hi

Basicly have been googling for a long time now and can't seem to find a clear answer. I want to bind to forms to each or something like that.

I have an main form and display a child form from it. But I want to make it one form and not 2 forms...glue the two borders in other words. Can that be done?

I dount. I dont think so.
But if this is only the look you want do have (so from 2 forms will be look like 1), you can do the following:
- put all the controls on each form intoa userControl (together with the code of course)
- create a third form (new one) and use those two userControls on it!

I cant see any other reasonable solution to this. I havent even heard of it before.

You can put a panel on the form, put all the first page controls on it, put another panel and put all the second page controls. Then hide whichever panel you won't want to display.

Can't you just set the forms to the same size and then set the Transparency Key of the top form to the background color? That should work...

If the first form is an MDI master form (has IsMDIContainer = true) and the second form is a child form (has MdiParent = firstform) then the child form is held inside the borders of the main form.
Setting the borders of the child form to be None (FormBorderStyle = None) and maximizing it (or setting Dock = Fill) will make the form fill the work area of the main form and appear as if it is a panel in the main form.

----

Alternately load the form as a control in the main form.

var child = new ChildForm();
this.Controls.Add(child);

If the child form has a border it acts just like a regular form but is captured inside the main form.
Again, set borders to None, set Dock or maximize to get the effect you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.