473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Using legacy ActiveX controls in Vs2005--Problems

We are trying to use legacy Visual Basic 6 ActiveX controls in C# projects
under Vs2005. The importing into Vs2005 Tools of the registered Ocx works
fine. We can place an instance of the control on a Form and the field
representing the control shows many methods and properties of the control.
The control is visible if the App is run. The problem is that many of the
methods are of the form "axSpinnerObj1.set_Min(ref object param0)". This is a
spinner control and one would expect this method to take a numeric value such
as an interger but the method takes an "object" which could be anything. The
control is a Third Party control and there is no indication of what the
"object" is. Examination of the Ax...dll and Interop...dll with Reflector
does not indicate what the object is. One would think that it is an integer
but attempting to pass an integer to the function causes it to fail since it
is expecting a type "object".

Can you suggest a solution to this?

Also are there any good books on ActiveX (created by Visual Basic 6 and
Visual C++ 6) controls as to using them in Vs2005 C# Form based projects
(i.e., Interop)?

Thanks.
int min=190;
object ob=null;
double vd=190.0;
string ca="Hello from axSpinnerObj1";
axSpinnerObj1.TipText="Tip text for spinner object";
axSpinnerObj1.set_ValueAsDouble(ref vd);
axSpinnerObj1.set_Caption(ref ca);
//axSpinnerObj1.set_Min(ref object param0)
axSpinnerObj1.set_Min(ref ob);

--
John Olbert

Jul 18 '06 #1
1 1416
This might help:
http://msdn.microsoft.com/VBRun/defa...NetUpgrade.asp

chanmm

"John Olbert" <so*****@snet.netwrote in message
news:49**********************************@microsof t.com...
We are trying to use legacy Visual Basic 6 ActiveX controls in C# projects
under Vs2005. The importing into Vs2005 Tools of the registered Ocx works
fine. We can place an instance of the control on a Form and the field
representing the control shows many methods and properties of the control.
The control is visible if the App is run. The problem is that many of the
methods are of the form "axSpinnerObj1.set_Min(ref object param0)". This
is a
spinner control and one would expect this method to take a numeric value
such
as an interger but the method takes an "object" which could be anything.
The
control is a Third Party control and there is no indication of what the
"object" is. Examination of the Ax...dll and Interop...dll with Reflector
does not indicate what the object is. One would think that it is an
integer
but attempting to pass an integer to the function causes it to fail since
it
is expecting a type "object".

Can you suggest a solution to this?

Also are there any good books on ActiveX (created by Visual Basic 6 and
Visual C++ 6) controls as to using them in Vs2005 C# Form based projects
(i.e., Interop)?

Thanks.
int min=190;
object ob=null;
double vd=190.0;
string ca="Hello from axSpinnerObj1";
axSpinnerObj1.TipText="Tip text for spinner object";
axSpinnerObj1.set_ValueAsDouble(ref vd);
axSpinnerObj1.set_Caption(ref ca);
//axSpinnerObj1.set_Min(ref object param0)
axSpinnerObj1.set_Min(ref ob);

--
John Olbert

Jul 19 '06 #2

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

Similar topics

2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
18
by: DartmanX | last post by:
Is there a simple way to determine if someone using Internet Explorer has completely disabled ActiveX controls? Jason
0
by: Zlatko Matić | last post by:
Where could I find information about using different ActiveX controls for Access (from "Insert ActiveX controle")?
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
2
by: John Olbert | last post by:
I am trying to use the utility tlbimp to add old ActiveX controls and Ocx's to the Toolbox of Vs2005. I tried to apply the the tlbimp to both the Tlb or Dll or Ocx files. The resulting Dll would...
0
by: John Olbert | last post by:
I have been given the task of finding ways to use legacy ActiveX controls in C# applications under Vs2005/Net2.0. At this time I am trying to use a number of ActiveX controls built with Visual...
4
by: Henrik Dahl | last post by:
Hello! Is it possible to use Visual Studio 2005 or, secondarily, Visual Studio .NET 2003 to create ActiveX controls which may be consumed by VB 6.0 programs, i.e. dealt with on forms in the...
6
by: =?Utf-8?B?U2llZ2ZyaWVkIEhlaW50emU=?= | last post by:
Previously I could write (supported) ActiveX controls for IE only. Has this changed with VS2008? Does office support ActiveX controls written in VS2008? What about older versions of office: will...
0
by: sanpo | last post by:
My application is in VBA (in AutoCAD). It uses MSHFlexgrid, which is now a licensed ActiveX control. With this, the application gives error on the user's machine that License not found. On...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.