Results 1 to 38 of 38

Thread: [RESOLVED] My old EXEs don't work

  1. #1

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Resolved [RESOLVED] My old EXEs don't work

    Hi. My question isn't a coding one. It's about the EXEs I have made with VB5. I had no problem opening them before. However, I recently formatted my pc and I have reinstalled VB5 on it. However, I can't seemed to open the EXEs I have previously made with VB5. These EXEs were different beta versions of my game to see how it was progressing. I actually had to open up my project and recompile the lastest version I was working on and it works fine. However, when I try to open the old EXEs, I get a MSGBOX telling me "unexpected error" and once I click OK, it closes. Anyone ever have this problem?

    I have winXP SP2, which I had before.
    Last edited by drivenbywhat; Jan 31st, 2010 at 12:40 PM.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: My old EXEs don't work

    Most likely there are some references that are not good anymore.
    Like some controls that you had a better version, and now that you formated your computer, you have the old version for the control.

    Either way... when you make your programs, you should add error handlers in EVERY sub/funtion, with line numbers also. That way, when you get an error (even when it's compiled) you can see precisly where the error is, down to the line number in code. So then you can go back to the code, and see where the problem is.

    The error message you got is a standard VB error, that is not descriptive at all, and ends the program right away.

    You should use a tool like MZ-Tools to add line numbers to the code, and also Error handlers.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: My old EXEs don't work

    If you were missing a reference or a different version then you would get a "Cant create object" error.

    Without knowing what code changed or even seeing the code we can not do anything more then guess.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Do you at least have the vbp for the old exe's? You can look in it to see what references you have then check the registry to find out if they are missing. That's a start.

  5. #5

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    @RobDog888 - So I'm not missing references?

    @CVMichael - I'll have to look into the Mz-Tools addin. So adding line numbers will show up along with the error?

    @randem - I don't have the vbp files. I did save the actual previous versions of the form itself. I could remove the current form and add the old form. Would this cause unreversible effects? Could I undo that and add the new form back?

    The main thing that has me stumped is that this is a very "basic" program. I use the main controls that come in the TOOLBOX like: btn, cmb, lst, txt, dialog box, lbl, winsock, tabs & timers. I'm only using one custom user control that I added in the last version of my program. I'm not using any classes or anything advanced like that. I'm just using if/then & select case for decision making. I also use the winsock commands to send/receive data. That is the most "advanced" code I use.

    It's very frustrating because the people who I sent this program out to can use it but not me!

    PS - the only reference that could be a problem is that after I formatted and opened my project for the first time, it said it was missing the comdlg32.ocx (not sure if that one was it specifically) reference. But I did noticed that the dialog control was not in the project. I had to add it. Which is weird because the other controls like winsock & tabs were there and they aren't normally there, you have to add them.
    Last edited by drivenbywhat; Aug 2nd, 2007 at 04:59 PM. Reason: added PS
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    You can also use *******. It very comprehensive in what you can add and it can trace your program also.

    How could you add or remove forms without the actual VBP project file?

  7. #7

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    randem, I have the original vbp file. When you said if I had each vbp file for each version of the program, then I don't have those. I only have one project file. I've saved the different versions of the forms. Cause I added/removed more controls. Now, I do also have the *.frx files, which are the files for the forms. I use vb5. Did the extension change in vb6?

    Also, I added a PS to the previous post. Please read, it has some more info on possibly helping me solve this problem.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  8. #8

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    The only code that has changed in the different versions of the program have been more if/thens & select cases.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    It's not your code as was stated it is your references that do not exist anymore. That is why when you recompile VB takes the new references to the objects and uses them and that is why the new exe works. The old references don't exist and can't be used by the old exe.

  10. #10

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Ok, I must be slow or something cause I don't understand. Once a program is made into an EXE, doesn't it just require the runtime files to be installed so it can run? Having installed vb5, I have those runtime files installed yet my program doesn't work? I would understand what you were saying about references if no one could use the program. However, I've moved the old EXE to my other pc and it runs fine. That pc doesn't have vb5, just the ocx's for tab, winsock & comdlg32. So what reference are you refering to? Aren't the ocx's & dll's in the SYSTEM32 folder? After installing vb again, that's where those files are still at. So I don't understand why it's not running on my main pc. If those files were missing, wouldn't it say something like: "component "name" not registered: file is missing or invalid" ...?
    Last edited by drivenbywhat; Aug 2nd, 2007 at 05:54 PM.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  11. #11
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Old references do not always mean ORIGINAL references/components. Those references could have be updated and are no longer compatible with original references/components.

    IE. VB Service Packs...

  12. #12

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Well, this is very frustrating. I have vb5, I don't know if any service packs were made for it. However, I personally haven't gone looking for its updates and I believe but I'm not sure that vb5 doesn't go looking for updates by itself. I also don't think windows update does this for vb5 either. Also, if the old components were somehow updated, how come when I put the new EXE in the other pc, which has the old components, it works there as well?
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Just because you don't remember does mean it didn't happen. You can not like it all you want, the reason will remain the same and constant.

  14. #14
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: My old EXEs don't work

    References are not only just controls but also dlls and other COM exposed programs. Why not just post some of your form_load code so we can see what else may be the issue. Also, if you have any references in the Project > References... menu.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  15. #15
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    The best case would be to just open the old vbp file in notepad and post that.

  16. #16

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Here is the code for the LOAD event. It's really basic code. I'm only an amateur programmer. I'm not referencing any dlls or other stuff. I'm just working within my program and the "needed regular controls". The subs being called at the end are just to disable buttons that are not available during the start of the game. The first subs are to load data into a variable array.

    VB Code:
    1. Private Sub Form_Load()
    2.  
    3. 'make sure winsock is closed
    4. Winsock.Close
    5.  
    6. 'x is for/loop counter
    7. Dim x As Integer
    8.  
    9. 'set form & tab size
    10. frmMain.Width = 13305
    11. frmMain.Height = 9930
    12. tbTabs.Width = 13215
    13. tbTabs.Height = 9255
    14.  
    15. 'fill instructions in txtInstruct
    16. txtInstruct.Text = "To view a card's description, click the card once. To add a " _
    17.                    & "card to your deck, click the card and then click the ""plus"" " _
    18.                    & "button. You could also double click the card. To remove a card " _
    19.                    & "from your deck, click the card and then click on the ""minus"" " _
    20.                    & "button. You could also double click the card. To change the order " _
    21.                    & "of a card in your deck, click the card and then click the red " _
    22.                    & """up"" or ""down"" button. To save your deck, click ""save"". To open " _
    23.                    & "your deck, click ""open"". To close a deck, click ""close""."
    24.  
    25. Call subPopulateRegular
    26. Call subPopulateSpecial
    27. Call subPopulateIntro
    28.  
    29. 'counter to add items to lstRegCards
    30. For x = 100 To 165
    31. lstRegCards.AddItem regCards(x).cardName
    32. Next x
    33.  
    34. 'counter to add items to lstSpcCards
    35. For x = 200 To 219
    36. lstSpcCards.AddItem spcCards(x).cardName
    37. Next x
    38.  
    39. 'counter to add items to lstEnhCards
    40. For x = 300 To 305
    41. lstIntCards.AddItem intCards(x).cardName
    42. Next x
    43.  
    44. 'add #s for MOVE
    45. For x = 1 To 14
    46.     cmbSlotAU1.AddItem x
    47.     cmbSlotAU2.AddItem x
    48.     cmbSlotBU1.AddItem x
    49.     cmbSlotBU2.AddItem x
    50. Next x
    51.  
    52. 'disable both buttons in game until a deck is opened
    53. Call subDisableAllButtons("both")
    54. Call subDisableAllOnline

    I do not have the old vbp file. I only have the current one. I have continued work on my game so it's not the same. However, the code added is just a bunch of if/thens.

    I'm close to just calling it quits for this mystery. I don't really "need" to see the old EXEs. Plus, I can run them on the other pc without any probs. However, the fact that I can run it on a different pc that it wasn't even made on is the part that bugs me.
    Last edited by drivenbywhat; Jan 31st, 2010 at 12:40 PM.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  17. #17
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    The ones with the red dots are the standard references. Your app probably would not work at all if there are not checked. Those are the runtime libraries and we know for sure they have constantly changed over time.

    Now, one thing I see right off is all of your controls are version 5. Which seems kind of strange that the other controls in your list are not even close to version 5. Check further down in your list to see if you see other such anomalies.

  18. #18
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Try running the Universal VB Runtime SP on the computer that doesn't work. I would be curious for the results.

  19. #19

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    @ randem - unless you weren't being literal, I don't see anything with "universal" on your site. Did you mean the vb5 runtime files? The vb6 runtime files?

    I'll scroll through references to see if any others are lower than version 5.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  20. #20
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    No, actually they are Universal VB Runtime files. They were not all released at the same time and other files that were released at the same time can't be used.

  21. #21

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    In regards to the references, you are right about the other controls not being close to version 5. Most are version 1. However, if I'm not using them, could it possibly be the problem?

    So I should download the vb5 runtime files?
    Last edited by drivenbywhat; Jan 31st, 2010 at 12:40 PM.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  22. #22
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    What I mean about that is those control were obviously updated... Either by you or another app that installed them.

  23. #23

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Okay. So do you still want me to download the runtime file? If so, should I just download vb5 runtime?
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  24. #24
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    If you are running VB5 then yes.

  25. #25
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    But I would almost be certain your issue stems from those updated controls.

  26. #26

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Ran the vb runtime files. Tried the old exes. Same error. The references seemed to have stayed the same version numbers.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  27. #27
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Yes, That is what I figured Those control were updated and the old exe cannot use them. If you had a BACKUP of your old releases you could verify this by looking in the vbp file.

  28. #28

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Ok, found a backup from what I used to get my files back. This is the version of the vbp file before I formatted. Now what do I have to do in the registry?
    Last edited by drivenbywhat; Jan 31st, 2010 at 12:42 PM.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  29. #29
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Nothing. This app uses Winsock Version 1.0 and you currently use Winsock Version 5.0. That is why your old exe's don't work. If you go to the registry on the other computer you will see the version of Winsock that is installed on that machine and I would bet it isn't Version 1.0.

    Post what your current vbp file is...

  30. #30

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    You're theory is sort of proving right. There is only one version of the controls that is not the same and it is just by a .1. I seem to now have an older version of COMDLG32.OCX. In the new one, I have 1.1. In the old one, it's 1.2. This is what I've gotten from the text file. I don't know where in the registry to look for this...
    Last edited by drivenbywhat; Jan 31st, 2010 at 12:42 PM.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  31. #31

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    I checked the actual ocx file properties. In the version tab, the pc that doesn't work has version 5.x. The pc that does work has version 6.x.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  32. #32

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Now that I think of it, I believe at one point in time I tried to install vb6 but it wouldn't install right. I also did install vb2005 express edition but uninstalled it after seeing that it was a big change from vb5. Does .net use version 6 of that ocx?

    So this is the whole root of the problem? Different versions of COMDLG32.OCX? This was the file that was stated in the loading error the first time I opened my project after formatting.

    Now my question is, since I guess I have been using version 6 for my old programs and now I'm using version 5, does this mean the people who I sent this program out to with the "old ocx files" will not be able to use it unless they replace that ocx with version 5?
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  33. #33
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    That all depends on what they already have installed. If they have a later version and you are attempting to install an earlier version that version will not get installed (unless you force it) and that would not be a good idea for the client for their other software may require the later version and not work with the earlier one.

  34. #34

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    I understand what you are saying.

    I still want to try one last thing. I'm going to register this new ocx on the pc that doesn't work and see if the program does work. If it does, then I will be 100% satisfied with the file version being the cause of the error. Then I'll update my project to point the to the new comdlg32.ocx control.

    I'll post my results soon.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  35. #35
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Check the registry on the computers that it does work on and you will see the current version it works with. You can use ********** to look specifically at the shared dlls and the registered components to see whats there.

  36. #36

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    Well, registering the new ocx didn't make the old exe work. I tried searching the registry on the pc that it does work on for the registry key stated in the vbp file but it didn't find anything. Where exactly in the registry should I be looking?
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  37. #37
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: My old EXEs don't work

    Use ********** it will take you to the exact location where the data is stored.

    View->Registered Components

    View->Shared Dll's

  38. #38

    Thread Starter
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: My old EXEs don't work

    I'll run the inno thing when I am less frustrated by this issue and see how it goes. I'm marking this thread resolved since I give up on this for now. Thank you randem and everyone for taking the time to help me out.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width