Results 1 to 13 of 13

Thread: VB6 crashes at start

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2020
    Posts
    4

    VB6 crashes at start

    Hello,
    few days ago VB6 suddenly stopped working on one of the computer.
    At start it shows message: "Visual Basic has encountered a problem and needs to close. We are sorry for the inconvenience." and that's it.
    On this computer there's Windows XP Professional with service pack 3.

    But there's a catch. If I login on that machine with another user, I can start VB6. Only with one user (mine) it can't be started.. Even if I'm logged with my user and start VB6 as another user, it works..
    I know that's one of the solutions for this topic, but I would still like to start it with my own user.

    If anybody has a clue what this might be, I would really appreciate any answer.

    Thank you in advance.

    Regards,

    DB

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6 crashes at start

    XP is long dead and dangerous to use.

    To work properly the VB6 IDE should always be run with elevated privileges. On XP that means your user account needs to be a member of the Administrators group, or at least a member of the Power Users group. Power Users doesn't exist post-XP since it opened an unnecessary vulnerability.

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: VB6 crashes at start

    Quote Originally Posted by dilettante View Post
    To work properly the VB6 IDE should always be run with elevated privileges. On XP that means your user account needs to be a member of the Administrators group, or at least a member of the Power Users group. Power Users doesn't exist post-XP since it opened an unnecessary vulnerability.
    @OP

    If it turns out that elevated privileges are indeed the problem, you can disable that annoying behavior in Windows 10 through a simple setting:-



    Disabling Admin Approval Mode for all Administrators would give the Pre-Windows 8(this admin approval nonsense was actually added in Windows 8) behavior we are all used to. That is to say, not having to explicitly run things as Administrator even when we are logged in using an Administrator account. However, I don't recommend that you do this on someone else's PC. You could easily be blamed if they did something stupid and got their PC infected with malware. It does provide a measure of security against the potentially dangerous actions of the uninformed user like running strange executables found on the internet.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    706

    Re: VB6 crashes at start

    You can use the method I posted here to start VB6 as Admin without turning off UAC, and without the UAC prompt showing up. It will probably work for XP, but an admin needs to set it up.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2020
    Posts
    4

    Re: VB6 crashes at start

    Thank you all for quick replies.
    I put myself into administrator group but result is the same. And also, those users, that I can start VB6 with, are not administrators, so I guess that's not the solution...
    For me, it looks like VB6 checks something in each user's folders and in mine something is wrong?!? Or there's something missing? I don't know..

    Regards,

    DB

  6. #6
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    759

    Re: VB6 crashes at start

    Quote Originally Posted by User1976 View Post
    I put myself into administrator group ...
    Under User Account Control, being an Administrator and running a Process as Administrator are not the same thing.

    You must go through the U.A.C. challenge to get into an "elevated" security context in which VB will run reliably.

    I would suggest that disabling U.A.C. really isn't an option these days.
    It's not exactly a new technology (launched some 13 years ago!) so you really ought to be trying to "play nicely" with it.

    Regards, Phill W.

  7. #7
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    706

    Re: VB6 crashes at start

    I don't know what you mean by "result is the same". Does VB6 start normally, or crash as soon as you start it?

    If it crashes, one possibility is Add-ons. Start VB6 as Admin, then disable all Add-ons. If you can't start VB6, then you either need to edit the following INI file, and set everything to 0, or use Regedit. I am not sure which one works, but I think it's the registry.

    C:\Windows\vbaddin.ini

    In Regedit, navigate to the following key:

    HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0\Addins

    Right click it and export it as a backup, then go to every subkey and change LoadBehavior to 0.

    For non-Admin users, see if this article helps:

    Q274484: HOWTO: Grant Users the Access to Add Visual Basic Components

  8. #8

    Thread Starter
    New Member
    Join Date
    Mar 2020
    Posts
    4

    Re: VB6 crashes at start

    Quote Originally Posted by qvb6 View Post
    I don't know what you mean by "result is the same". Does VB6 start normally, or crash as soon as you start it?
    Hello, thank you for you reply.

    So, to clarify situation:
    - Yes, VB6 crashes directly at starting it. With the generic error "Visual Basic has encountered a problem and needs to close. We are sorry for the inconvenience." I also did what you recommended (run it as administrator and disable all add-ins), but it still doesn't start with my user...

    - Maybe it would be helpful (or not) if I tell you that I've been using VB6 with my user for years. It collapsed last Thursday. Suddenly, without any clue why.

    Regards,

    DB

  9. #9
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    706

    Re: VB6 crashes at start

    Check System Restore, however, this also reverts back any EXE file that you have created from VB6, so make sure that you recompile any EXE that you have compiled since then. Also, sometimes it's graphics card driver that is updating itself.
    Last edited by qvb6; Mar 24th, 2020 at 08:37 AM.

  10. #10
    Lively Member Grant Swinger's Avatar
    Join Date
    Jul 2015
    Posts
    71

    Re: VB6 crashes at start

    I've seen this before and it's usually a corrupt user profile. Profile settings are stored at "C:\Documents and Settings\Your_Account\NTUSER.DAT" (replace Your_Account with your actual account name). Windows loads this file into HKEY_CURRENT_USER in the Registry when you login. VB6 keeps some its setting there and tries to read them when it starts.

    I'm afraid there is no easy fix. You'll need to copy all the files out of your account, then delete it and recreate it. You'll need a second account that's a member of the Administrators group.

  11. #11
    Lively Member Grant Swinger's Avatar
    Join Date
    Jul 2015
    Posts
    71

    Re: VB6 crashes at start

    For some reason this ended up as a double post.

  12. #12
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,487

    Re: VB6 crashes at start

    Quote Originally Posted by Grant Swinger View Post
    For some reason this ended up as a double post.
    Regarding your double post, the vbforums web site has had this bug for many many months.
    If you do a simple post (using the box on this web page), you get some flippin message telling you to wait 30 secs and try again.
    Just ignore that and return to the main VB list, You will see that you are the last person to post, and if you go into the thread, your post will be there. You have my personal guarantee.
    For those that think my personal guarantee, aint worth the paper it is written on, you could do this instead.
    Don't type your post on this page. Instead click the advanced button to type and post your reply.
    That page does not have the 30 sec bug.
    Rob
    PS You are not the only member getting fooled by this bug.

  13. #13

    Thread Starter
    New Member
    Join Date
    Mar 2020
    Posts
    4

    Re: VB6 crashes at start

    Hello,
    I would like to say thank you to all of you for your ideas how to solve this.
    I tried everything you described and it didn't help. So I reinstalled VB6 and now it's ok.
    I don't know why I didn't do that in the first place...

    Regards,

    DB.

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