Help converting a small VB.net app to ActiveX dll.

Hoping someone can point me to tutorial or walkthrough on how to go about doing something that seems like it should be pretty easy.

I have a very small vb.net (using mostly ADO.net) program that needs to be converted into an ActiveX dll.

All I want to do is to be able to call a funciton in the ActiveX with some parameters. With those parameters i want to load some tables from an Access DB and change some of the values in one of those tables based on data from the other.

I have the actual program that does the work of getting tables and making the changes worked out in VB.net using ADO.net and it works fine.

So what do I need to do convert it to an ActiveX dll and, once it is converted, are there any other steps I need to take to get it to work with other programs?

I am going to use a Public Health program called Epi Info (http://www.cdc.gov/epiinfo/) which will use the DLL in this manner:

DEFINE DLLOBJECT "."
Is any valid EpiInfo variable name you wish.
Refers to the internal ActiveX project name.
Refers to the class inside the DLL to be called.

(What "class" refers to is pretty obvious, and I think that the Name refers to the name of the DLL, but if it something else that would be good to know!)

My goal is to be able to make a call from Epi Info to the dll like this:

UpdateFile(dbName, parentTable, childTable, relatedWith)

and have the dll take care of all processing just like the VB.net program I already have does.

I gather it was a lot easier to make an ActiveX dll with VB 6, because everything I have googled seems to point this out. What I haven't found is a straightforward description of how this is to be done in Visual Studio 5 with VB.net...

I would greatly appreciate a point in the right direction.

Tom

Comments

  • That's because ActiveX is a thing of the past, with VB.NET.
    Don't ask me for the specifics, but the .NET framework offers a new way of programming. What you are looking for is a Class Library.

    Best Regards,
    Richard

  • : That's because ActiveX is a thing of the past, with VB.NET.
    : Don't ask me for the specifics, but the .NET framework offers a new way of programming. What you are looking for is a Class Library.
    :
    : Best Regards,
    : Richard
    :
    :

    So a class library project with public methods for what I want to access from my other program is probably what I am looking for, right?

  • :
    : So a class library project with public methods for what I want to access from my other program is probably what I am looking for, right?
    :
    :

    Formally speaking a class Library exposing a Class with public methods :P
    But yes it should work.

    However, when I peered through the project I did miss a couple of essential things I did have with VB6. Mostly, the ability to specify the Access of the clas: public or private, or a global class (a class that has 'global' methods/functions you can call without creating an instance of the class).

    Looks to me like you're after the 'Global Class' thing. I'd sift through the help files on Classes for those things if I were you. (F1 from the IDE with Class selected is a good place to start).

    Sorry I can't give you more info, but I'm mostly specified in VB6, and not the .NET way of doing things.

    Note that when writing with any .NET language, any computer wanting to run the program require the .NET Framework installed (not by default supplied with Windows XP, but can be downloaded).

    Best Regards,
    Richard

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories