Visual Basic Development Bookmark and Share   
 Home > Visual Basic Interop and Upgrade > VB 2008 Can't see some properties of VB 6 OCXs
 

VB 2008 Can't see some properties of VB 6 OCXs

I have a large library of graphical control OCXs created under VB 6. I can import them into VB 2008 projects and for the most part they work perfectly except that some properties are not seen by VB 2008. For example, the "caption" property of one control works fine while the same property of another control is invisible to VB 2008. These properties not only do not show up in the Solution explorer, but they cannot be referenced in a program or an error occurs. For the most part they are string properties such as "Caption", "FilePath", "Password 1", etc. I tried renaming them to less common names with ne effect. I even tried recompiling the objects in VB6 with most the other properties eliminated and they still do not show up.

Is there any way of getting these to work without going through a full translation?
Hollandtech  Thursday, November 12, 2009 7:10 AM
Hi Hollandtech,

Please see this thread for more information about using ActiveX control in .NET Windows Form application.
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/3c82e613-5db1-4329-a976-1d0e2030fa9d

It should give you help on this question. If you have any further issues, feel free to tell us.



Best regards,
Riquel
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong  Tuesday, November 17, 2009 9:46 AM
Hi Riquel_Dong,

Thank you so much for responding. I will read that closely. Meanwhile I have figured out at least most of the problems. OCX objects apparently execute somewhat differently under the VB8 environment. I found that I could get my properties to appear if I avoided calling a LET from within a GET. That worked under VB6, but the property disappears under VB8.

I also found that I had to eliminate a GET picture property function that was supposed to give access to a chosen picture. After it was called, it would erase other graphics on my control. I never used the function but it never caused any problems under VB6. The problem would only happen in the design mode when the Property Window would execute the GETs for an object's property. In the run time it would only erase the graphics if specifically called.

John Holland
Hollandtech  Wednesday, November 18, 2009 5:45 AM
Hi Hollandtech,

Please see this thread for more information about using ActiveX control in .NET Windows Form application.
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/3c82e613-5db1-4329-a976-1d0e2030fa9d

It should give you help on this question. If you have any further issues, feel free to tell us.



Best regards,
Riquel
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong  Tuesday, November 17, 2009 9:46 AM
Hi Riquel_Dong,

Thank you so much for responding. I will read that closely. Meanwhile I have figured out at least most of the problems. OCX objects apparently execute somewhat differently under the VB8 environment. I found that I could get my properties to appear if I avoided calling a LET from within a GET. That worked under VB6, but the property disappears under VB8.

I also found that I had to eliminate a GET picture property function that was supposed to give access to a chosen picture. After it was called, it would erase other graphics on my control. I never used the function but it never caused any problems under VB6. The problem would only happen in the design mode when the Property Window would execute the GETs for an object's property. In the run time it would only erase the graphics if specifically called.

John Holland
Hollandtech  Wednesday, November 18, 2009 5:45 AM

You can use google to search for other answers

Custom Search

More Threads

• A "loaded" Introp Control - How to?
• set_textmatrix - MsFlexGrid to DataGrid conversion
• Register .NEt DLL
• Optional boolean parameter in .NET interface implemented in VB6 has incorrect default value
• Using DLL with VB.net
• How To convert an VB6.0 Activex EXE project to Microsoft Visual Studio2005 (.NET) project
• Upgrade (Problem with MSFlexGrid)
• Problems using a VB6 usercontrol in .NET 2005 - can't find interface, and unable to create from progid
• String * 255 to VB6.FixedLengthString(255) conversion issue
• Interop user control messaging deadlock