CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    ActiveX DLL problem

    I created an ActiveX DLL application by using Books Online Demo as example. I put MsgBox in both Module - Main() also Class Module - MyFunction(). I used another VB EXE application to test the AxtiveX DLL. The MsgBox in Main() was running but the MsgBox in MyFunction() didn't appear. Both MsgBox didn't come out when I used VC application to test.

    I'm very new to ActiveX and don't know what to do to check out the problem. Can anybody tell what's wrong of my program?

    Thanks


  2. #2
    Guest

    Re: ActiveX DLL problem

    When you create an Active X DLL and if you are using a seperate instance of vb
    to test the app you have to set a reference to the component (DLL) using the
    Project-References menu and instantitate the object of the class
    in your form add the following code

    dim x as Project1.Class1('Add your project and the class name
    'Instantiate the object
    set x=new Project1.Class1
    'Access the properties /methods of the object
    x.MyFunction()

    This should work


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

Featured