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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Soumya BPosted Mar 15, 2010, 7:27 AM
Sam HobbsPosted Mar 12, 2010, 5:54 PM
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.
theLizardPosted Mar 12, 2010, 1:30 AM