|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Multiple Component ClassesHi 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. 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. Show quoteHide quote "TClancey" <t***@idcodeware.co.uk> wrote in message news:p9KdnQIazaHoUtjYRVnyvA@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. > 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. Show quoteHide quote "Marina Levit [MVP]" <someone@nospam.com> wrote in message news:eL6Kh2C$GHA.1224@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" <t***@idcodeware.co.uk> wrote in message > news:p9KdnQIazaHoUtjYRVnyvA@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. >> > > 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. Show quoteHide quote "TClancey" <t***@idcodeware.co.uk> wrote in message news:R_ednf2Of--2sdvYnZ2dnUVZ8qednZ2d@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]" <someone@nospam.com> wrote in message > news:eL6Kh2C$GHA.1224@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" <t***@idcodeware.co.uk> wrote in message >> news:p9KdnQIazaHoUtjYRVnyvA@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. >>> >> >> > > 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. Show quoteHide quote "Marina Levit [MVP]" <someone@nospam.com> wrote in message news:u6uUGcG$GHA.4196@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" <t***@idcodeware.co.uk> wrote in message > news:R_ednf2Of--2sdvYnZ2dnUVZ8qednZ2d@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]" <someone@nospam.com> wrote in message >> news:eL6Kh2C$GHA.1224@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" <t***@idcodeware.co.uk> wrote in message >>> news:p9KdnQIazaHoUtjYRVnyvA@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. >>>> >>> >>> >> >> > > 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: Show quoteHide quote > 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]" <someone@nospam.com> wrote in message > news:eL6Kh2C$GHA.1224@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" <t***@idcodeware.co.uk> wrote in message >> news:p9KdnQIazaHoUtjYRVnyvA@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. >>> >> > > 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. Show quoteHide quote "Theo Verweij" <tverw***@xs4all.nl> wrote in message news:OI73ddN$GHA.4704@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]" <someone@nospam.com> wrote in message >> news:eL6Kh2C$GHA.1224@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" <t***@idcodeware.co.uk> wrote in message >>> news:p9KdnQIazaHoUtjYRVnyvA@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. >>>> >>> >> 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 Show quoteHide quote > 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.
Can't override CultureInfo.ToString
Mixed types in multidimensional arrays Re: ActiveX raise event - attn Walter Wang More than one method is found with VB but not with C# Application.StartupPath Messages Did Mabry Software Tank! GET SUBNET LOCATION IN VB.NET How to read XML from a string variable?? Use dll created in dotnet using them from vb6 |
|||||||||||||||||||||||