473,486 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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.

Sep 14 '05 #1
0 664

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3907
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
1
1885
by: William LaMartin | last post by:
For several weeks I have been trying to track down the cause of disappearing session and application variables. At the site that gives me the problem--a Microsoft FrontPage site--I note that there...
5
3031
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
5
8924
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column...
11
2420
by: E.T. Grey | last post by:
Hi, I have an interesting problem. I have a (LARGE) set of historical data that I want to keep on a central server, as several separate files. I want a client process to be able to request the...
13
13229
yolenman
by: yolenman | last post by:
Hello - This is my first posting to this group, so please bear with me. Also note, that while I'm intelligent, databases are not in my field of knowledge. I'm working with a small limousine...
1
1580
by: leenadiwan | last post by:
Friends, Im having problem with accessing a JS file placed in another folder from a JSP popup. I tried all the following: <SCRIPT LANGUAGE="JavaScript1.1" ...
2
1456
by: sushma | last post by:
Hi all. My Problem is i have an application that launches an external process on a button click. The other process has a feature of accessing a file during its load and also in its formclosing...
5
2544
by: weidongtom | last post by:
Hi, I tried to implement the Universal Machine as described in http://www.boundvariable.org/task.shtml, and I managed to get one implemented (After looking at what other's have done.) But when I...
0
1089
by: priyamtheone | last post by:
Hi everyone, I'm working with VB.Net 2005(.Net framework 2.0). I am having a problem in accessing the items in a menustrip of a form. Suppose there is an item in a menustrip named FILE. Under the...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.