Re: Inherits broken in VB 2.0?
- From: "Marina" <someone@xxxxxxxxxx>
- Date: Mon, 12 Dec 2005 15:57:09 -0500
Nothing is broken.
When you create a user control, VS creates a .Designer file that contains
all the designer generated code. In there it says that the class inherits
from UserControl. So there is your conflict.
If you start off with just a class file, try restarting VS after you change
it to inherit from TabControl. That may help in giving the designer surface.
"Gregory Gadow" <techbear@xxxxxxxx> wrote in message
news:439DE351.31EC73F2@xxxxxxxxxxx
>I am looking to create a custom TabControl in VB using VS 2.0. All of
> the documentation I've found online starts with
>
> Public Class NewTabControl
> Inherits Windows.Forms.TabControl
>
> End Class
>
> But when I try that, I get the following error message:
>
> "Base class 'System.Windows.Forms.TabControl' specified for class
> 'NewTabControl' cannot be different from the base class
> 'System.Windows.Forms.UserControl' of one of its other partial types."
>
> I am starting my new control with a User Control, which seems to be the
> problem; starting with a Class file works fine. But I'm not sure how to
> attach a designer component to a Class, which would allow me to add some
> custom drawn items, such as a "close" button on the tab. Any suggestions
> on how to subclass a standard control?
> --
> Gregory Gadow
>
>
.
- References:
- Inherits broken in VB 2.0?
- From: Gregory Gadow
- Inherits broken in VB 2.0?
- Prev by Date: Re: Better way
- Next by Date: Re: Executing files from a small VB program
- Previous by thread: Inherits broken in VB 2.0?
- Next by thread: Re: Inherits broken in VB 2.0?
- Index(es):