By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Multiple Component Classes

P: n/a
Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component Classes
that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component Class?
I've tried creating a new Class Library within the same application but get
the same problems.

Any ideas?

Cheers,
Tull.
Oct 30 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
I don't know what makes you think you can't have 2 different classes that
inherit from the same base class - but this is simply not the case.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:p9********************@bt.com...
Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component Classes
that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same application
but get the same problems.

Any ideas?

Cheers,
Tull.

Oct 30 '06 #2

P: n/a
I'm not quite sure what you mean. If you try to add two classes that each
use a visual designer to the same ".vb" file, Visual Studio will only let
you visually edit the first one. If that is what you are doing, then simply
move one of the classes to its own ".vb" file. If you are already splitting
them into separate files, then please provide additional information.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component
Classes that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same
application but get the same problems.

Any ideas?

Cheers,
Tull.

Oct 30 '06 #3

P: n/a
Sorry, I should have provided more information.

I have created a Class library project.

Within this project I have created several Component Classes.

I had one component class that inherited a picture box, all was well.

I then created another component class and tried to inherit the picture box,
I got an error telling I couldn't use the class as it was already being used
in the base class. I didn't think this was correct.

I've got around the problem by using Control Classes, but this isn't what I
wanted to do.

Any ideas?

Cheers,
Tull.

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
>I don't know what makes you think you can't have 2 different classes that
inherit from the same base class - but this is simply not the case.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:p9********************@bt.com...
>Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component Classes
that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same
application but get the same problems.

Any ideas?

Cheers,
Tull.


Oct 30 '06 #4

P: n/a
Sorry, I don't really follow. If you have 2 different classes, that both
inherit PictureBox, that should compile fine without a problem. I don't know
what it is you are doing or what kind of code you have, I really couldn't
follow what you were saying.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:R_******************************@bt.com...
Sorry, I should have provided more information.

I have created a Class library project.

Within this project I have created several Component Classes.

I had one component class that inherited a picture box, all was well.

I then created another component class and tried to inherit the picture
box, I got an error telling I couldn't use the class as it was already
being used in the base class. I didn't think this was correct.

I've got around the problem by using Control Classes, but this isn't what
I wanted to do.

Any ideas?

Cheers,
Tull.

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
>>I don't know what makes you think you can't have 2 different classes that
inherit from the same base class - but this is simply not the case.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:p9********************@bt.com...
>>Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component Classes
that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same
application but get the same problems.

Any ideas?

Cheers,
Tull.



Oct 30 '06 #5

P: n/a
Can you provide us with the clss definitions (class + inherits +
implements statement)?
I get the funny feeling you are trying to implement multiple inheritance
TClancey wrote:
Sorry, I should have provided more information.

I have created a Class library project.

Within this project I have created several Component Classes.

I had one component class that inherited a picture box, all was well.

I then created another component class and tried to inherit the picture box,
I got an error telling I couldn't use the class as it was already being used
in the base class. I didn't think this was correct.

I've got around the problem by using Control Classes, but this isn't what I
wanted to do.

Any ideas?

Cheers,
Tull.

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
>I don't know what makes you think you can't have 2 different classes that
inherit from the same base class - but this is simply not the case.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:p9********************@bt.com...
>>Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component Classes
that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same
application but get the same problems.

Any ideas?

Cheers,
Tull.

Oct 31 '06 #6

P: n/a
I have since got around the problem and changed all the code, otherwise I
would send it in.

Anyway, thanks for your help.
Cheers,
Tull.

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:u6**************@TK2MSFTNGP03.phx.gbl...
Sorry, I don't really follow. If you have 2 different classes, that both
inherit PictureBox, that should compile fine without a problem. I don't
know what it is you are doing or what kind of code you have, I really
couldn't follow what you were saying.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:R_******************************@bt.com...
>Sorry, I should have provided more information.

I have created a Class library project.

Within this project I have created several Component Classes.

I had one component class that inherited a picture box, all was well.

I then created another component class and tried to inherit the picture
box, I got an error telling I couldn't use the class as it was already
being used in the base class. I didn't think this was correct.

I've got around the problem by using Control Classes, but this isn't what
I wanted to do.

Any ideas?

Cheers,
Tull.

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
>>>I don't know what makes you think you can't have 2 different classes that
inherit from the same base class - but this is simply not the case.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:p9********************@bt.com...
Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component
Classes that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same
application but get the same problems.

Any ideas?

Cheers,
Tull.



Oct 31 '06 #7

P: n/a
I have since got around the problem and changed all the code, otherwise I
would send it in.

Anyway, thanks for your help.
Cheers,
Tull.
"Theo Verweij" <tv******@xs4all.nlwrote in message
news:OI**************@TK2MSFTNGP04.phx.gbl...
Can you provide us with the clss definitions (class + inherits +
implements statement)?
I get the funny feeling you are trying to implement multiple inheritance
TClancey wrote:
>Sorry, I should have provided more information.

I have created a Class library project.

Within this project I have created several Component Classes.

I had one component class that inherited a picture box, all was well.

I then created another component class and tried to inherit the picture
box, I got an error telling I couldn't use the class as it was already
being used in the base class. I didn't think this was correct.

I've got around the problem by using Control Classes, but this isn't what
I wanted to do.

Any ideas?

Cheers,
Tull.

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
>>I don't know what makes you think you can't have 2 different classes
that inherit from the same base class - but this is simply not the case.

"TClancey" <tu**@idcodeware.co.ukwrote in message
news:p9********************@bt.com...
Hi all.

I'm having some problems with a project I'm working on.

I have a Class Library which contains several Component Classes, each
working independantly. It seems that I can't have two Component
Classes that Inherit the same standard vb control, ie PictureBox.

Do I have to create a whole seperate Class Library for each Component
Class? I've tried creating a new Class Library within the same
application but get the same problems.

Any ideas?

Cheers,
Tull.

Oct 31 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.