VB6 .object in .NET? (for MapFactor OCX)
-
Hi, I have a Map system (mentioned in the object) that in VB6 is addressed that way: private mpview as IMapView (an interface) mpview=axmap.object (where axmap is the control on the form) The problem with VB.NET is that I don't have the .object property. And if I simply try mpview=axmap I get an invalid cast.... Any idea how to work it around? Thanks Briga
-
Hi, I have a Map system (mentioned in the object) that in VB6 is addressed that way: private mpview as IMapView (an interface) mpview=axmap.object (where axmap is the control on the form) The problem with VB.NET is that I don't have the .object property. And if I simply try mpview=axmap I get an invalid cast.... Any idea how to work it around? Thanks Briga
A better bet would be to ask the manufacturer of the control what the correct procedure is for VB.NET. You'll find a very small user base, if any at all, for people with experience with this control. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Hi, I have a Map system (mentioned in the object) that in VB6 is addressed that way: private mpview as IMapView (an interface) mpview=axmap.object (where axmap is the control on the form) The problem with VB.NET is that I don't have the .object property. And if I simply try mpview=axmap I get an invalid cast.... Any idea how to work it around? Thanks Briga
If the manufacturer of the VB6 OCX cannot provide you with the NET Interop assemblies needed to use the VB6 OCX in .NET, then what you will have to do is put the Map control in a VB6 UserControl that provides all wrapper functions you need to interact with the child Map control from your NET application. Then you should be able to import the UserControl you created into VB.NET. You should review your licensing agreement. Most commercial VB6 OCX controls prohibit reverse engineering, and wrapping in another OCX for purposes of redistribution to other developers. Wrapping a 3rd party OCX in your own custom control OCX for use in your own applications is rarely a violation. But you should still check. Robert
-
If the manufacturer of the VB6 OCX cannot provide you with the NET Interop assemblies needed to use the VB6 OCX in .NET, then what you will have to do is put the Map control in a VB6 UserControl that provides all wrapper functions you need to interact with the child Map control from your NET application. Then you should be able to import the UserControl you created into VB.NET. You should review your licensing agreement. Most commercial VB6 OCX controls prohibit reverse engineering, and wrapping in another OCX for purposes of redistribution to other developers. Wrapping a 3rd party OCX in your own custom control OCX for use in your own applications is rarely a violation. But you should still check. Robert