By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,942 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

How to add a form to tab control

P: 17
Dear all,

Could somebody tell me how to add a vb form to a tab control (VB 6.0)? I have some 5 forms and i would like to add each form to the tab control.

Regards,
Sasie
Jul 14 '08 #1
Share this Question
Share on Google+
5 Replies


P: 5
May Be You Can Not Add Form in Tab Control But You Can Trt A Tab Control and Put Your All Form's Control In Tabular Format
Jul 14 '08 #2

P: 17
I just gave an example of 5 forms. But in our live application we have around 50 forms. We have a new requirement to display all forms in a tab control. It would be time consuming to select all controls of each form and place them in the tab control. I tried using setParent API and it works fine, but some times the form position changes. I would like to know whether any other work around is there.
Jul 14 '08 #3

debasisdas
Expert 5K+
P: 8,127
Dear all,

Could somebody tell me how to add a vb form to a tab control (VB 6.0)? I have some 5 forms and i would like to add each form to the tab control.

Regards,
Sasie
That is not possible because form is the parent control and container for all other controls.

You need to use MDI for that.
Jul 14 '08 #4

!NoItAll
100+
P: 296
You can select all of the controls of a form then cut and paste them. Sometimes the arrangement is a little off, but correcting that only takes a few seconds.
So - you are going to wind up with some 50 tabs here, made from a 50 form application? Wow - this sounds like an app written by Beelzebub himself!
Jul 15 '08 #5

smartchap
100+
P: 236
Dear sasie7679

First of all design all your forms separately. Now say ur forms are named form1, form2,...,etc. Place a tab control in a separate form which will be ur main form. Now on click event of tabs write code to load & show the corresponding form (form1 or form 2 or any other form) in that tab (by using index of that tab). Also align the form's left and right as per tab size.
Jul 18 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.