AxImp & VB .Net

M

Moi

Hello,

I used AxImp on one ActiveX I've written (VC++6), and I'm trying to use the
generated assemblies in VB. Net.

it seems that the underlying ocx is not created when I'm calling the
AboutBox method
(or any method/member of my activex).

What am I missing ?

Thanks,
Laurent

Imports AxEARAXLib

Public Class Form1

Inherits System.Windows.Forms.Form

Dim myax As New AxEarAX()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Debug.WriteLine(myax.ProductName)

Try

myax.AboutBox() ' InvalidActiveXStateException thrown here --- myax.ocx =
Nothing :(

Catch ex As Exception

Debug.WriteLine(ex.Message)

Debug.WriteLine(ex.StackTrace())

End Try

End Sub

End Class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top