place a Form on a TabPage

Y

yoramo

hello

I have a tabControl wite several pages I whould like to place a form ontop
of one of it's pages.
how do I do that?

Yoramo
 
Y

yoramo

Hello Bob

There is no such property in my form!!, how does it help me to place a Form
on a TabPage?

thanks
Yoramo
 
Y

yoramo

Well I figured it out !!

1. I change the baseclass of my Form to a TabPage
2. I remove the:
'AutoScaleBaseSize' property and the 'Load' Event if it is present (for
a DataForm it is!!)
3. compile and run.

thats it !! it works.

Yoramo
 
Y

yoramo

No, C# is my prefered language.

can you explain what did you mean with TopLevel member?

yoramo
 
H

Herfried K. Wagner [MVP]

* "yoramo said:
I have a tabControl wite several pages I whould like to place a form ontop
of one of it's pages.
how do I do that?

Don't use a form, design and use a usercontrol instead.
 
D

David

Cool.

Maybe TopLevel is an advanced member.. ?

It is.
Are you programming in VB?

Well, both languages have the "hide advanced" feature, although I don't
know if the defaults are different.

yoramo,

What Bob is talking about here is that if you ever don't see a property
show up in intellisense when you know it should be there, go into
Tools-Options-Text Edit-C# (or VB)-General, and click OFF the "Hide
Advanced Members" checkbox.
 
Y

yoramo

Thanks David !!
But I still do not understand how this TopLevel property helps placing a
Form on a TabPage or replace it.

yoramo.
 
B

Bob Powell [MVP]

When a Form has TopLevel set to false, it behaves more like a control and
can be added to container classes.

Herfried is correct in suggesting the use of a user control but some people
already have a form built and so can fudge it by resetting the TopLevel
property.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com

yoramo said:
Thanks David !!
But I still do not understand how this TopLevel property helps placing a
Form on a TabPage or replace it.

yoramo.
 
U

Uri Dor

I don't think you can, but using a UserControl can be what you're
looking for - create a new UserControl and on it put whatever controls
you need. you can put the UserControl on the tab page
 

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

Similar Threads

Big Problem with Tabcontrol 2
Backcolor of tabcontrol-tabpages area? 4
subclass tabpage 1
Tabcontrol 1
hide the tab of tabpage 9
Tabbed interface 1
Tabcontrol focus 4
Inheriting from TabPage 1

Top