开发者

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开发者_如何学Python# or VB.NET?

Please see the picture below to get what I mean.

How to display a form inside another form like Visual Studio


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜