2 Attachment(s)
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.
Attachment 187261
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.
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.
Re: Compatibility mode in vb6
Quote:
Originally Posted by
baka
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
Re: Compatibility mode in vb6
Can you explain why you need this, because neither the VB6 IDE nor compiled application need these shims
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.
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.)
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.
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.
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