place a Form on a TabPage

  • Thread starter Thread starter yoramo
  • Start date Start date
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
 
Hello Bob

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

thanks
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
 
No, C# is my prefered language.

can you explain what did you mean with TopLevel member?

yoramo
 
* "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.
 
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.
 
Thanks David !!
But I still do not understand how this TopLevel property helps placing a
Form on a TabPage or replace it.

yoramo.
 
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.
 
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
 
Back
Top