1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Old VB3 .dlls giving problems migrating to VB6

Discussion in 'Software Development' started by Niessen, Mar 10, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. Niessen

    Niessen Thread Starter

    Joined:
    Jul 31, 2005
    Messages:
    36
    I am trying to upgrade a number of VB3-generation projects to VB6. No .dlls are called in the code (that I write in the forms) but, obviously, some dlls are called when compiling and when generating distribution packages (e.g. COMCAT.dll or MFC40.dll). When the Setup routine runs, my XP laptop sees the 1998 version of the files trying to replace the 2004 versions in WINDOWS/System32 and won't let me continue (rightly so). I assume that these files were incorporated as calls from some (unknown which) of the controls placed on the VB3 forms.

    Is there any way to either get around this . . . other than by recreating each of the forms using the VB6 platform? or ???

    Ultimately, I want the projects (engineering number-crunchers) to be distributed in a CD on an engineering text I am close to publishing so I want them to run on (at least) XP and Windows 7 platforms.
     
  2. -Fabez-

    -Fabez-

    Joined:
    Jul 28, 2008
    Messages:
    1,899
    As both Visual Basic 3 and 6 have been superseded by Visual Basic 2008 and Visual Basic 2010 soon, it is advisable to upgrade directly to Visual Basic 2008. As the syntax and methodologies used have changed, it will be far easier to either rewrite the code that needs updating or to recreate the projects from scratch.
     
  3. Niessen

    Niessen Thread Starter

    Joined:
    Jul 31, 2005
    Messages:
    36
    Thank you for your thoughts . . . Note, however, that my CODE does not call any dlls . . . they are (I believe) called by the forms and controls "under the hood." Therefore, "rewriting the code" means redesigning etc. ALL of the forms and controls soup to nuts. This is possible but my last ditch approach.
     
  4. Niessen

    Niessen Thread Starter

    Joined:
    Jul 31, 2005
    Messages:
    36
    I "looked" into the package that I had prepared (on my laptop) and copied the .exe files for the six programs I had worked up. I put them on the desktop (note that I had not been able to "install" the programs). They all ran fine. While
    we did not have all of the bells and whistles of a formal installation, they DID the engineering task. Wouldn't that be OK for the purpose I have (enclosing them on a CD with my book for use by the owner on a windows-based PC machine)?
     
  5. -Fabez-

    -Fabez-

    Joined:
    Jul 28, 2008
    Messages:
    1,899
    Regardless of whether your code calls any .Dll's if your solution uses any user created code then it will need updating to the latest version of the language to improve performance and stability. You can still use most of your old controls in Visual Basic 2008, so they would not need redesigning. If you are not concerned about using an old version of the .Net framework, then distributing the executable programs should be fine.
     
  6. Niessen

    Niessen Thread Starter

    Joined:
    Jul 31, 2005
    Messages:
    36
    Fabez,

    Thank you for your thoughts and help. While my "solution" is not elegant nor, necessarily, long-lived, I will go forward. I do plan to include the dlls etc. that were assembled into the distribution package on the CD so, in a vanilla or new machine that does not include all of the supporting files, the user can, at least, try and address the problem by putting the files in his Windoes/System32 folder.
     
  7. -Fabez-

    -Fabez-

    Joined:
    Jul 28, 2008
    Messages:
    1,899
    If you are going to do it that way, a good idea would be to include the .Net distributable in case a user does not have .Net installed. Another point to note would be to remind the users to back up any .Dll's they replace. Glad you managed to solve the problem :D
     
  8. Niessen

    Niessen Thread Starter

    Joined:
    Jul 31, 2005
    Messages:
    36
    I am sorry for my ignorance . . . but what is the ".Net distributable" and is it distributable without copyright ownership? The thought about backing up .dlls replaced is good.

    Also, if your package is "looking" for a file (say, MFC40.dll) and you copy a file to the C:\Windows\System32 directory . . . does the machine find it without "registering" the file in the registry?
     
  9. -Fabez-

    -Fabez-

    Joined:
    Jul 28, 2008
    Messages:
    1,899
    The .Net Redistributable is software from Microsoft that allows .Net applications to be run on computers that do not have .Net installed. As it is a free download from Microsoft, you can freely distribute it as long as you do not claim it as your own, etc. As for the .Dlls, they should be self registering, however if they do not register you can use the regsvr32 command.
     
  10. Niessen

    Niessen Thread Starter

    Joined:
    Jul 31, 2005
    Messages:
    36
    Thank you!
     
  11. -Fabez-

    -Fabez-

    Joined:
    Jul 28, 2008
    Messages:
    1,899
    Glad I could help :D
     
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/909159

  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