Embed Form in TabPage

  • Thread starter Thread starter Amigaso
  • Start date Start date
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
 
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.
 
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
 
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
 
Back
Top