Results 1 to 3 of 3

Thread: [SOLVED] using ActiveX in C# project

  1. #1

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    Question [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.
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  3. #3

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103
    Thanx!

    It seems to work fine.

    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width