Hi,
Is it possible to dock a windows form in a particular tab of a tab control, such that on click of a tab the form appears inside the tab as its child (without the title of the form being visible)?
Please share your ideas
Regards
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
theLizardRank #1,079 · 1.8K reputationPosted Mar 11, 2010, 8:30 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Mar 12, 2010, 12:54 PM EST
See my Creating Tab Controls Using CTabCtrl, although it is not likely to help you except it shows I did spend time learning about tab controls. My article in my web site is for MFC, so it won't help you very much.
You can remove the title bar by setting the form's FormBorderStyle property to FormBorderStyle.None and setting the form's ControlBox property to false.
You might be able to get it to work using the main form as a MDI container and the subform a MDI subform, but MDI might not do what you want to do. You might also need to handle thing such as showing and hiding the subform when it's tab is clicked or another tab is clicked; that is essentially what happens with the Windows SDK equivalent.
I think what you want to do is to use a Panel. You an probably get the functionallity you want using panels. I think it is possible to put a form in a panel in a form but I am not sure.
Soumya B18 reputationPosted Mar 15, 2010, 3:27 AM EDT