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

Re: Embed Form in TabPage by Alex

Alex
Sat Sep 29 00:58:29 PDT 2007

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
>



Re: Embed Form in TabPage by Herfried

Herfried
Sat Sep 29 03:56:23 PDT 2007

"Amigaso" <ksmg035@hotmail.com> schrieb:
> 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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Re: Embed Form in TabPage by Amigaso

Amigaso
Sat Sep 29 13:54:44 PDT 2007

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" <ameleta@gmail.com> wrote in message
news:2013d8253e13d8c9d0a72f884c70@msnews.microsoft.com...
> 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
>>
>
>



Re: Embed Form in TabPage by Andrew

Andrew
Thu Oct 04 18:32:08 PDT 2007

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" <ksmg035@hotmail.com> wrote in message
news:uW7X4rtAIHA.4984@TK2MSFTNGP06.phx.gbl...
> 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" <ameleta@gmail.com> wrote in message
> news:2013d8253e13d8c9d0a72f884c70@msnews.microsoft.com...
>> 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
>>>
>>
>>
>
>