Results 1 to 7 of 7

Thread: VB6 program on Vista

  1. #1

    Thread Starter
    Member LoopUntil's Avatar
    Join Date
    Jul 2008
    Posts
    58

    Question VB6 program on Vista

    I finished a program in VisualBasic 6.0, works fine on mine Windows XP (this one and on my father computer too).
    But it will work on Windows Vista?!

  2. #2

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: VB6 program on Vista

    For some general advice on things that won't work (and how to fix some of them), see the thread about Vista in our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)

    You can do a partial test in XP, by creating a new Windows user (via Control Panel) with restricted permissions (called a Limited user), and run the program as that user (note that they probably won't be able to use VB, it is likely to crash when you open a project).

    You will still need to test on Vista to be sure, but at least you can sort out any obvious issues.

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

    Re: VB6 program on Vista

    There are basic rules to follow when developing for Vista.

    Dont use file locations for storing data in locations other then appdata and the common data locations as any other location will produce File Virtualization.

    Dont use the Registry for storing settings or even just reading it as it takes adminostrator permissions to read/write to maost locations. Use a xml config file stored in the appropriate location.

    Follow these two basic rules and you wil bypass most issues.


    Without knowing or seeing your code we can not guess if it will run on Vista.
    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

  5. #5

    Thread Starter
    Member LoopUntil's Avatar
    Join Date
    Jul 2008
    Posts
    58

    Re: VB6 program on Vista

    Ok, thanks guys... but Vista has this registry key:

    HKLM\Software\Microsoft\Windows\CurrentVersion\Run ??

    No? If not my program will not run on startup :\

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: VB6 program on Vista

    It is not a good idea to write to HKLM from your program (as only Admin users can do it), you should use the HKCU version (which applies to just the current user) instead.

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

    Re: VB6 program on Vista

    Correct, anything outside of HKCU will require Administrator permissions to access. If you are writting to the Run key that should be done during installation. Not program startup.
    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

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