469,611 Members | 1,718 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,611 developers. It's quick & easy.

Problem accessing VB6 OCX file from VB.NET

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 "InvalidActiveXStateException". 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.

Nov 21 '05 #1
0 858

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by William LaMartin | last post: by
5 posts views Thread by Daniel Corbett | last post: by
5 posts views Thread by Scott M. Lyon | last post: by
2 posts views Thread by sushma | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.