Hello:
I am trying to access a VB6 OCX file (with many important methods in it
created by me) using VB.NET.
Let me tell you what I have done to access the methods.
I started with registering the OCX file using regsvr32 and registering
the ocx file. I tried to create an object using the NEW keyword but was
giving me an error saying that the method NEW was private and I cannot
access it outside.
So I upgraded the old VB6 project to .NET and it created a new .dll
file with a "New" method in it. So I could declare an object for that.
But whenever I start trying to access any methods in the OCX file I get
an exception saying "InvalidActiveX StateException" . If I debug step by
step, I dont get that exception and but I dont get correct results from
the methods.
"Register for COM Interop" option is selected in the properties and I
also registered the new .dll file using regasm.But the methods still
donot work.
Please Help
Thanks in advance.
I am trying to access a VB6 OCX file (with many important methods in it
created by me) using VB.NET.
Let me tell you what I have done to access the methods.
I started with registering the OCX file using regsvr32 and registering
the ocx file. I tried to create an object using the NEW keyword but was
giving me an error saying that the method NEW was private and I cannot
access it outside.
So I upgraded the old VB6 project to .NET and it created a new .dll
file with a "New" method in it. So I could declare an object for that.
But whenever I start trying to access any methods in the OCX file I get
an exception saying "InvalidActiveX StateException" . If I debug step by
step, I dont get that exception and but I dont get correct results from
the methods.
"Register for COM Interop" option is selected in the properties and I
also registered the new .dll file using regasm.But the methods still
donot work.
Please Help
Thanks in advance.