Shop OBEX P1 Docs P2 Docs Learn Events
VB6 to VB 2010 Help Needed. — Parallax Forums

VB6 to VB 2010 Help Needed.

NWCCTVNWCCTV Posts: 3,629
edited 2012-09-09 14:42 in General Discussion
I have a VB6 project folder that I somehow need to get converted to VB 2010 Express. Any ideas? The converters on the web do not work as I have tried several of them.

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2012-09-09 11:19
    It depends to a great extent on what VB6 features your application uses; the automatic converters don't work because VB.NET is quite simply a different language than VB6, and simply does not implement some very fundamental features of VB6. You probably used a feature that doesn't exist in .NET, and will have to code around it.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2012-09-09 11:44
    There in lies the issue. I did not code this. It is a driver/program to run a 3 port USB stepper motor driver. The manufacturer, although still in business, refuses to update the .ocx file. I have no way of opening this file to see what is in it to try and duplicate it. The forms within the project I can handle but I am stuck with the .ocx.

    In thinking about it, is it possible to call up the .ocx file within my own VB 2010 app without having to modify it, or will I need to create a .dll instead?
  • Mike GMike G Posts: 2,702
    edited 2012-09-09 12:13
    ocx files are binaries - COM. Therefore, you need the source to modify it!

    It is possible to wrap an ocx in .NET using runtime callable wrappers; COM InterOp.

    If you have the .NET SDK, you can use tlbimp.exe to build the wrapper and expose the interfaces.
  • localrogerlocalroger Posts: 3,452
    edited 2012-09-09 13:00
    NWCCTV is using Express, the free version of .NET. The ability to use .ocx plugins is probably one of the things missing from that.
  • Mike GMike G Posts: 2,702
    edited 2012-09-09 14:15
    I believe the OP can call the ocx (COM Object) with express. It's part of the framework not the editor.

    http://msdn.microsoft.com/en-us/library/8bwh56xe.aspx
    http://msdn.microsoft.com/en-us/library/ms973800.aspx

    The ability to create COM object and expose its' interface in VS Express is another thing.
  • ctwardellctwardell Posts: 1,716
    edited 2012-09-09 14:42
    Take a look at this, it might be helpful:

    http://msdn.microsoft.com/en-us/library/8ccdh774(v=vs.100).aspx

    C.W.
Sign In or Register to comment.