Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB6 .object in .NET? (for MapFactor OCX)

VB6 .object in .NET? (for MapFactor OCX)

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Briga
    wrote on last edited by
    #1

    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

    D R 2 Replies Last reply
    0
    • B 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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • B 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

        R Offline
        R Offline
        rwestgraham
        wrote on last edited by
        #3

        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

        B 1 Reply Last reply
        0
        • R rwestgraham

          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

          B Offline
          B Offline
          Briga
          wrote on last edited by
          #4

          Thank you Robert for the reply. I did it and it did work, that has been a very good idea. Now I'm struggling with a couple of bitmap pointers but all the rest works properly. Sorry for the late reply but I was away for a while! Briga

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups