Doesnt import all ActiveX component properties

M

miskomisko

..net v2.0, VS 2005, VB6

Hi,

I try to import my vb6 application to vb .net. The application uses my
special activeX component which i want to import. When i import ocx
file. Component is imported but not with all its properties. The
property:

Public Property Get Value(ByVal iRow As Long, ByVal iCol As Long) As
Variant
....

and

i tried to replace variant with object but the same result... Simple
properties are imported, f.e.
public porperty get Hi()

when i look with object browser i see two records. The name of the
file and the "Ax"+name of the file, what is normal. In record with
name of the file are this missing properties shown, but in Ax.. one
arent. Why? How can I make it to import it? I can change the code of
ActiveX componet. But f.e. property Value is Get-Let property and is
used in many formulars so i think replacing property with sub or
function is not good solution, because vb6 doesnt support methods
overloading . Do you have any suggestions how to solve it? thank for
any reply
 
P

Petar Atanasov

miskomisko said:
.net v2.0, VS 2005, VB6

Hi,

I try to import my vb6 application to vb .net. The application uses my
special activeX component which i want to import. When i import ocx
file. Component is imported but not with all its properties. The
property:

Public Property Get Value(ByVal iRow As Long, ByVal iCol As Long) As
Variant
...

and

i tried to replace variant with object but the same result... Simple
properties are imported, f.e.
public porperty get Hi()

when i look with object browser i see two records. The name of the
file and the "Ax"+name of the file, what is normal. In record with
name of the file are this missing properties shown, but in Ax.. one
arent. Why? How can I make it to import it? I can change the code of
ActiveX componet. But f.e. property Value is Get-Let property and is
used in many formulars so i think replacing property with sub or
function is not good solution, because vb6 doesnt support methods
overloading . Do you have any suggestions how to solve it? thank for
any reply

Hi miskomisko,

VB.NET does not support anymore VARIANT and CURRENCY data types.

One possible solution to overcome the situation is to replace it with
the Object (speaking for the VARIANTs) equivalent in .NET.

If you can change the code of the ActiveX, than I suggest you to
revision the variant properties with ones with strict definitions (e.g.
- Integer, Long, etc.). Of course - that would impact on your formulas
calculations, so this would be harder, but the produced code will be
more clear and precise. Using variants was not good practice even in the
VB6 times. So in this way you can achieve two goals: code review of your
project and better future integeration with the VB.NET.

In a addition, check out this article, it shows some of the differences
between VB6 and VB.NET: http://www.thescarms.com/vbasic/vb6vsvbnet.aspx
which I suppose would be helpfull in your work.

HTH,
Petar Atanasov
http://a-wake.net
 

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