Results 1 to 9 of 9

Thread: Compatibility mode in vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2022
    Posts
    4

    Compatibility mode in vb6

    Hello everyone, i have problem with compatibility with my compiled project. What do i mean. After I have compiled the project i've set Windows Vista to compatibility mode. Right click on the file properties, compatibility and set compatibility mode.
    Everything looks ok until i move the file on my other pc. When i click on properties and compatibility, i see the compatibility mode is unchecked. I thought once i set compatibility mode, it will work of my other pc. Is there way to set compatibility vista mode pernament? I am attaching a photo to make it clearer.

    Name:  25.jpg
Views: 156
Size:  22.9 KB

    P.S I've tried "Change settings for all users", doesn't work, also set Vista compatability mode and "Change settings for all users" of the VB6.EXE but it's still the same.

    If you wonder why im asking this, it's because it's very annoing everytime to do this manually.
    Attached Images Attached Images  

  2. #2
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,334

    Re: Compatibility mode in vb6

    is there any reason why u need to run it wil compatibility mode?
    I would instead look into why I need that and instead change the code so it can run in any windows.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2022
    Posts
    4

    Re: Compatibility mode in vb6

    Quote Originally Posted by baka View Post
    is there any reason why u need to run it wil compatibility mode?
    I would instead look into why I need that and instead change the code so it can run in any windows.
    Yes there is a reason why i want to use compatibility with Windows Vista

  4. #4
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,575

    Re: Compatibility mode in vb6

    Can you explain why you need this, because neither the VB6 IDE nor compiled application need these shims

  5. #5
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,334

    Re: Compatibility mode in vb6

    yeah. u better explain.

    one very EASY solution is: "error trapping"
    if "ONLY" vista is working, u will get an error when trying to run it using another windows. well just use error trapping for it.
    if error, u make a msgbox "this application can not run .. blablablab.... try changing to vista compatibility mode", end.

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,169

    Re: Compatibility mode in vb6

    I'll third that. I've never used any compatibility mode on any compiled VB6 executable. I've have experimented with them, and, without exception, always found they caused more problems than they solved (and actually, haven't found any problems).

    So please, outline what problems you're having.

    (Now, the IDE, that's another issue, and still one of the full compatibility mode shim sets is not the way to go.)
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  7. #7
    Addicted Member ISAWHIM's Avatar
    Join Date
    Jan 2023
    Posts
    170

    Re: Compatibility mode in vb6

    Compatibility mode was truly created, as a temporary fix, for functional reasons with RARE specific cases.

    All it is really doing, in most cases, is restricting specific functions and actions, to a set of functions and actions that were available ONLY to those versions. This includes display-driver emulation, API emulation, etc... It will NOT simulate Windows-XP or Windows-Vista. Actually, now, unlike those versions, it WILL allow use of certain "display and API functions", that didn't exist in those versions. (Mostly for security reasons or just because they killed old functions and replaced them with new ones.) However, it will still attempt to "simulate" those older versions, as best it can. It's just not simulating "windows", to that program. It's simulating that program, in windows. (If that makes sense.)

    That is always why it asks, after running a new program name... "Did this program function properly?"

    By the way, these settings are "by name" of the program and specific to YOU on YOUR computer. They are not built-in to the program, in any way.

    EG, If you make a program called "Program1.exe" and set compatibility to WinXP. It is ONLY that specific "Name" that will have that function, on your specific account, in that specific folder location. If you rename the program in the IDE, then compile it as "MyProgram.exe", in the same location, it will NOT be running in WinXP compatibility mode. The same will happen if you, as you saw, "copy the program to another computer", or even to another folder. It looses the compatibility mode. If you move it back to the same folder, "poof" now it has compatibility mode back on it.

    That is one thing to take note of... Even if you remove "Program1.exe", from that location. If you make a NEW program, with that same name, it WILL NOW have the same settings as the OLD ONE that you deleted. (It's a horrible windows hack that still remains.)

    Also, it leaves all those settings in the registry, as bloat, if you keep doing this over and over for programs. It only removes the REG settings if you manually remove the compatibility settings for each named program you set them for.
    Last edited by ISAWHIM; Mar 27th, 2023 at 01:36 PM.

  8. #8
    Addicted Member ISAWHIM's Avatar
    Join Date
    Jan 2023
    Posts
    170

    Re: Compatibility mode in vb6

    P.S. VB6's last version of windows was "WinXP SP3", which should be the ONLY thing you are setting it to, if anything at all.

    Setting it to an OS that is earlier, can lead to more potential issues than it solves. Unless you are using a VB6 version FROM that time period, where it was last updated ON that system.

    One perfect example... The "menu system". It once worked fine in WinXP and in WinXP compatibility mode. However, NOW, it no longer has all the function and doesn't work correct, in ANY mode. (Current or older.) It has the same "broken" functionality in every compatibility mode. (The issue is that the "background color" in the menu no longer works correctly, through the IDE, or API.)

    The style changes of the window still sort-of function. But it never upgrades past "WinXP SP3", unless you manually make it update with API calls.

  9. #9
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    4,133

    Re: Compatibility mode in vb6

    There's a 99% chance you'd be better off not doing this, but you can deploy a custom compatibility shim with your application. Use the compatibility administrator, which might take some effort to track down as you have to install the one specific to your Windows version, to create the shim then use sbinst.exe to install it during your app setup.

    https://learn.microsoft.com/en-us/wi...and-deployment

Tags for this Thread

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