views:

493

answers:

1

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 What 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.

A: 

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.

Kavitesh Singh
@Kavitesh, I could replicate the look and feel of both those screen shots in a WinForms app that was not MDI, using standard MenuStrip and TabControl for the second screen. I've asked OP to clarify.
BillW
@BillW: I mentioned it in point 2 incase he would like to use the tabcontrol for having such a look. I have just provided him with two options and he can choose either of them. Using dockpanel, you can have side panels like we have in visual studio's solution explorer or properties. Its something he may require at some later point. If you using tabcontrol then surely you would not need MDI. His first screen shows the MDI type application though. So keeping that in mind i gave the first option.
Kavitesh Singh
@Kavitesh, no criticism of your answer was intended. Sukria, (and, if my intuition is correct : "Sat Sri Akal").
BillW
@BillW: "Sat Sri Akal" - I am with you here :) Any acquaintance to an indian or its movies :)??
Kavitesh Singh