tags:

views:

205

answers:

1

Hi,

We have a third party app that has VBA integrated into it. This all allow us to open a vb6 activeX Dll that contains a UI and we pass the apps instance to the vb6 dll.

' Instantiate the SMTree UI.
Set oSMTree = CreateObject("SMTree.clsMain")

' Start it up.
oSMTree.cMain Application

Then in the VB6 app the main looks like:

Public Sub Main(app As ACNProfessionalAB.CMerchman)

  Set oACNApplication = app

End Sub

Is there a way to create a WPF app that can be called in the same way and pass in the callings app instance so I don't have to continue using VB6?

Thanks in advance! rich

+1  A: 

If you can create the object via a COM Interop in .Net you should then be able to assign a reference to that object as the interface will be the same.

Just add the ActiveX dll as a reference via the project references screen which will generate the interop dll and then use your exisiting code as above to assign the reference in your xaml.vb file.

MaSuGaNa