1 Replies - 4897 Views - Last Post: 21 October 2009 - 05:46 AM Rate Topic: -----

#1 maxbox51  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 16-October 09

VB6 ActiveX DLL wrapper for .NET Windows Forms App?

Posted 16 October 2009 - 03:42 PM

Hi, I'm trying to write a script which will be called from a legacy application. Unfortunately the instructions provided by the legacy app are a bit confusing...and I'm new to VB in general, as well as the interoperability issues of COM vs. .NET.

However, I believe I have whittled down the issues to just ONE SIMPLE THING. (Maybe?)

I have:

( a ) A VB6 ActiveX DLL containing a project (Project1). Project1 contains a class called ProcessClass,
which contains one subroutine, ProcessActive(). These names are required by the legacy application, and
the idea is to put this DLL in a particular directory; then the DLL appears on a Script menu (it does) and the
application tries to run it (and depending on which time I tried, either does nothing or gives errors that indicate it at least recognizes the VB6 DLL).

( b ) A VB 2008 Windows Forms application, App1.EXE, which I have registered (using RegAsm App1.EXE /tlb:App1.tlb /codebase) for use in COM. App1 appears in the list of references in VB6, and I have checked it. The main form in App1 is called Form1.

Now, my simple (naive) question:

What code do I put in ProcessActive() to get App1.EXE to run? I can't look in the Help in VB6, it says "The MSDN collection does not exist. Please reinstall MSDN." Looking in the documentation for VB 2008, I see Process.Start(), but (i) I don't know if that exists in VB6 and (ii) I don't know what to try to run; App1? App1.Form1? The App1.EXE file, with full pathname?

Is This A Good Question/Topic? 0
  • +

Replies To: VB6 ActiveX DLL wrapper for .NET Windows Forms App?

#2 Philip Munce  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 14-October 09

Re: VB6 ActiveX DLL wrapper for .NET Windows Forms App?

Posted 21 October 2009 - 05:46 AM

I think the command you are looking for in VB6 is Shell.

If you are running an exe from VB6 one option might be to wrap the call to the exe in a batch file to make it easier to control parameters.

Good luck anyway it sounds like you are close...:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1