Embed Form in TabPage

A

Amigaso

Can somebody provide an example on how to embed a form in a TabPage.

I have a bunch of tabPages that behave pretty much the same, so I created a
base form with the basic functionality and from there I am going to create
instances of that base form and embed them in TabPages, is it possible?

TIA
 
H

Herfried K. Wagner [MVP]

Amigaso said:
Can somebody provide an example on how to embed a form in a TabPage.


I suggest to use usercontrols instead of forms, although Alex' tip will
basically work.
 
A

Amigaso

Thanks for the Tip Alex, it worked ok.

Do I need to change another property for the form to stay within the
boudaries of the TabPage?, the bottom of the form is not visible, in other
words looks like form's size is bigger then the TabPage, (grew more when
embedding it in the TabPage)




Alex Meleta said:
Hi Amigaso,

Try this:
form.TopLevel = false;
form.Parent = tabPanel.TabPages[0];

Regards, Alex
[TechBlog] http://devkids.blogspot.com


Can somebody provide an example on how to embed a form in a TabPage.

I have a bunch of tabPages that behave pretty much the same, so I
created a base form with the basic functionality and from there I am
going to create instances of that base form and embed them in
TabPages, is it possible?

TIA
 
A

Andrew P.

You can also check this out:
http://www.geekpedia.com/tutorial230_Capturing-Applications-in-a-Form-with-API-Calls.html -
the second project will capture any existing process into a tab. That is if
you don't mind making calls to unmanaged code.

Amigaso said:
Thanks for the Tip Alex, it worked ok.

Do I need to change another property for the form to stay within the
boudaries of the TabPage?, the bottom of the form is not visible, in other
words looks like form's size is bigger then the TabPage, (grew more when
embedding it in the TabPage)




Alex Meleta said:
Hi Amigaso,

Try this:
form.TopLevel = false;
form.Parent = tabPanel.TabPages[0];

Regards, Alex
[TechBlog] http://devkids.blogspot.com


Can somebody provide an example on how to embed a form in a TabPage.

I have a bunch of tabPages that behave pretty much the same, so I
created a base form with the basic functionality and from there I am
going to create instances of that base form and embed them in
TabPages, is it possible?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top