use vb6 code

Discussion in 'Questions (Windows Mobile)' started by wm.chatman, Mar 26, 2009.

  1. wm.chatman

    wm.chatman Well-Known Member Licensed User

    hi folks

    can I use Visual Basic 6.0 or VB2008 Express Edition code in Basic4 ppc?


    WmC


    PC: Laptop CoreDUo, Windows XP SP2 E
    PPC:hp5555"ARM"/Windows CE 4.2/no internet connection
    Bayern/Germany
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    No. You will need to manually convert it. Note that Visual Basic 6 and VB .Net (Visual Studio 2008) are different programming languages.
     
  3. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Can we use an ActiveX dll, compiled with VB6?
    If so, then how is that done?

    RBS
     
  4. agraham

    agraham Expert Licensed User

    Yes-ish, probably maybe - see http://www.basic4ppc.com/forum/questions-help-needed/1854-com-controls.html#post10125 Ideally you need VS with which it is dead easy on the desktop as it builds the Interop Assembly for you which you can also do at the command line with the tlbimp.exe utility. Then you need to write a Basic4ppc library in C# or VB.NET that uses the Interop Assembly to expose the bits you want to Basic4ppc.
     
  5. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    OK, thanks, that doesn't look that promising then and probably not worth the trouble. I do have VS6, but I don't know about any .net. It looks that as you need .net coding in any case it might be easier then to re-write the ActiveX dll in .net.

    RBS
     
  6. agraham

    agraham Expert Licensed User

    Too old I'm afraid. You need VS2005 or VS2008 to be able to do .NET development.

    Probably as you need to write the wrapper library in .NET anyway. The free Express versions of VS200x will do desktop libraries (I think) but you need VS2005 Standard or VS2008 Professional (ouch!) to do device libraries. SharpDevelop is free and can do devices as well but I believe it is a bit more finicky to use than VS but I don't know as I have never tried it. I use VS2005 Standard myself.

    According to Microsoft the "Visual Basic 2008 Express includes a migration wizard that will help import existing Visual Basic 6.0 projects. You may need to make some manual adjustments to the code you port over, but the migration wizard is a good first step towards moving your code forward."
     
  7. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Ah, yes, of course.

    All I have heard is that this is a fruitless task and that is better to re-write from scratch.
    Will forget about this.

    RBS
     
  8. wm.chatman

    wm.chatman Well-Known Member Licensed User

    Hi Erel

    have to try another way then.
    10/4 on that
    WmC

    PC: Laptop CoreDUo, Windows XP SP2 E
    PPC:hp5555"ARM"/Windows CE 4.2
    Bayern/Germany
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice