Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2007

Tip: Looking for answers? Try searching our database.

Embed Form in TabPage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amigaso - 29 Sep 2007 02:42 GMT
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
Alex Meleta - 29 Sep 2007 08:58 GMT
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.
>
[quoted text clipped - 4 lines]
>
> TIA
Amigaso - 29 Sep 2007 21:54 GMT
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)

> Hi Amigaso,
>
[quoted text clipped - 13 lines]
>>
>> TIA
Andrew P. - 05 Oct 2007 02:32 GMT
You can also check this out:
http://www.geekpedia.com/tutorial230_Capturing-Applications-in-a-Form-with-API-C
alls.html
-
the second project will capture any existing process into a tab. That is if
you don't mind making calls to unmanaged code.

> Thanks for the Tip Alex, it worked ok.
>
[quoted text clipped - 20 lines]
>>>
>>> TIA
Herfried K. Wagner [MVP] - 29 Sep 2007 11:56 GMT
"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.

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.