Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / July 2006

Tip: Looking for answers? Try searching our database.

class library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vlad - 27 Jul 2006 10:20 GMT
Hi!

I have no experience in COM interop so I really need some help.

I have to reuse some vb.net code in VBA.
I made a new class library project where I added a new com class with
some public members and methods. After resolving some conflicts, like
some Warnings about generic types, I was able to add this library in
VBA in References.

my questions are:

do I have to add all my classes from vb.net as Com classes in this
library? Can I still let some as normal classes? Am I able to use them
like this?
what about masks? Am I able to add them also and reuse in VBA?

I have to pay attention to all used types not to be generic ones? where
can I find which types are nongeneric?

thanks a lot!
Dmytro Lapshyn [MVP] - 27 Jul 2006 12:43 GMT
Hi Vlad,

> do I have to add all my classes from vb.net as Com classes in this
> library?

No, only those you want to use from VBA.

>Can I still let some as normal classes? Am I able to use them
> like this?

Sorry, don't get you here.

> what about masks? Am I able to add them also and reuse in VBA?

Hmm...what are masks? Something I've never heard of in .NET...

> I have to pay attention to all used types not to be generic ones? where
> can I find which types are nongeneric?

Yes, you are most likely limited to non-generic classes only.
I think MSDN Library should indicate whether a class is generic or not.

Signature

Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL

> Hi!
>
[quoted text clipped - 17 lines]
>
> thanks a lot!
Vlad - 27 Jul 2006 13:29 GMT
Hi!
thanks for your answer.

So, if I understood corectly I have to add as com classes just those
which I use in VBA.

what about those classes which are indirectly used, for ex. if in VBA I
need Keyword.vb (com class) and this class is using another class,
Operator.vb, this last one should I added also as COM class or just as
Class??

I used "mask" word for Forms. Can I put them also in this library to be
able to reuse? Or just the controls, like DataGridView?

I had a problem to use something like:
"Inherits DataGridViewButtonCell"
Do you have any idea how can I solve this?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.