Alex Essilfie
Alex Essilfie

Reputation: 12613

How to display a form inside another form like Visual Studio

How does Visual Studio and other similar programs display a form in their IDE?
Is it possible to achieve the same or a similar effect using C# or VB.NET?

Please see the picture below to get what I mean.

Visual Studio IDE with a form in design view

Upvotes: 2

Views: 2219

Answers (3)

Dr Herbie
Dr Herbie

Reputation: 3940

If you are talking about hosting a Winforms editor in your code, it is entirely possible and is actually built in to the .NET framework!

The Essence is the IDesignerHost interface. The whole system is complicated, but can be done (I have done it in production code for runtime layout configuration editing). There is a sample of code from Microsoft here.

I'm sure if you search fir 'IDesignerHost' you'll find enough reference material to figure it out.

Upvotes: 3

Sasha Reminnyi
Sasha Reminnyi

Reputation: 3522

Are you speaking about UI creating tools? Refer to http://www.icsharpcode.net/opensource/sd/ - SharpDevelop for deep dive. It's open sourse, so you'll be able to find out more details.

Upvotes: 2

s1mm0t
s1mm0t

Reputation: 6095

I believe what you want is a multiple document interface (MDI) see http://msdn.microsoft.com/en-us/library/ms973874.aspx for more info.

Upvotes: 1

Related Questions