|
-
Feb 15th, 2003, 10:18 AM
#1
Thread Starter
Lively Member
[SOLVED] using ActiveX in C# project
Hi all!
I need an easy-step-by-step explanation about how I can use an ActiveX DLL (done with VB6) into my C# app.
Let's say I got:
- mydll.dll with myclass in it.
- test.cs
- into test.cs I want to do:
myclass mc = new myclass();
Console.WriteLine(mc.myproperty);
How to do it?
Thanx!
Last edited by neodatatype; Feb 18th, 2003 at 07:36 AM.
-
Feb 15th, 2003, 11:06 AM
#2
Go to Project->AddReference
From the COM tab choose your ActiveX object.
Now the name of the ActiveX is a namespace in your project. You can write:
Code:
MyActiveX.MyClass o = new MyActiveX.MyClass();
Console.WriteLine(o.MyProperty);
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 18th, 2003, 07:42 AM
#3
Thread Starter
Lively Member
Thanx!
It seems to work fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|