473,378 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Multiple Component Classes

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
7 1085
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: yackel | last post by:
Hi there, I'm just in the paper-designing stage of an inventory / sales database but am looking for some help and suggestions as it seems a little out of the norm due to the different classes of...
2
by: Edward Diener | last post by:
How does one specify in a component that a property is a pointer to another component ? How is this different from a property that is actually an embedded component ? Finally how is one notified in...
0
by: Edward Diener | last post by:
In Borland's VCL it was possible to divide a component into design time and run time DLLs. The design time DLL would only be necessary when the programmer was setting a component's properties or...
10
by: Steven Spits | last post by:
Hi, Because we have a large WebApp, back in 2002 we decided to use the following method: http://support.microsoft.com/default.aspx?scid=kb;en-us;307467 In short: Create a project "a" at...
10
by: eswanson | last post by:
I have broken up my web site into smaller web site projects. When I look at the precompiled files, it always has the virtual directory in them ie: <preserve resultType="3"...
1
by: Felix_WafyTech | last post by:
Hi, I'm working with the ObjectDatasource and the application is getting more and more chatty. Is there a way I could make the ObjectDatasource support multiple DataTables that could be...
47
by: Mark | last post by:
why doesn't .NET support multiple inheritance? I think it's so silly! Cheers, Mark
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
3
by: Mike Hudson | last post by:
Performance/good practice wise which one is preffered. 1. Keep adding new classes/forms to an existing project. Or 2. Create a new project based on the requirement and add the reference. Which...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.