开发者

How would i make another application's child window into a tab? (C#)

For instance, I have an application that has a main window and then child windows inside of it. http://screenshots.rd.to/sn/e3hek/sapienfullwindow.png http://screenshots.rd.to/sn/e3hek/appscreen8.png W开发者_如何学Pythonhat i need is to grab each individual child window of that application, and display them as tabs in my application, or on a panel's handle.

I already have code to kidnap the application and put it into mine, and it works great.


MDI support is already present in the C#. So the first screenshot is using the MDI option.

The second screenshot is using tabbed windows. Now you have two options:

  1. Use this opensource library DockPanelSuite which will let you have tabs in your application. something similar to visual studio interface. You can create forms and then tab it based on your needs. You can even dock them anywhere in the parent form by drag and drop. Just like in visual studio.
  2. The second option is to create a form with tab control covering the whole windows. There you create tabs using the resource editor and hide/show based on the forms you want to display to the end user.

In my opinion, use the first option which gives you lot more customization. Also if you use the dockpanel, you can switch between the views shown in your first screenshot and second one. So user has better control as to how he wants to view. Dockpanel is free to use even in commerical apps and comes with source code. So you can either use the dll or directly incorporate the code in your application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜