That's my analysis, anyway. I "distributed" my app to our organization this morning only to learn that, after a month of new work in XE8 on this old win32 app, clients not using the Windows 7 "Basic" theme see a very faded appearance . But those of us using remote desktop or using the Basic theme see about what I think we've always seen .
Facts:
Truths:
The dpr looks like this:
program db_silookup;
uses
Vcl.Forms,
Vcl.Themes,
Vcl.Styles,
//...
{$R *.res}
{$R 'win7.rc'}
begin
Application.Initialize;
Application.UseMetropolisUI;
Application.CreateForm(TfmSi, fmSi);
Application.CreateForm(TfmXferList, fmXferList);
TStyleManager.TrySetStyle('Windows');
Application.Title:='Law School Lookup';
Application.Run;
end.
And because I suspect it matters, win7.rc is:
1 24 "win7.manifest"
Which in turn is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="App" version="3.1.0.0" processorArchitecture="*"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
</dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</assembly>
Disable / remove everything related to Metropolis from your app. Metropolis is only meant for Windows 8+ Metro style apps, which legacy apps have no business working with (unless you wish to convert your UI to Metropolis which is practically a re-write).
It seems as if the usage of Metropolis UI has overridden your colors and is using the colors which it would otherwise be using in a Metro style application.
Another option (while cleaning up) would be to start from scratch without a .dproj
file (back it up just in case). It will automatically detect the type of app and upgrade it to default settings. You will still of course have to re-do many things in the setup, but it's a good way to rid any old references and clean up these sort of problems (given you've already removed all other Metropolis references).
Since you are including your own manifest you should disable "Enable runtime themes" or you will have duplicate manifests included in exe, but there can be only one.
You should use "Use custom manifest option" instead, remove {$R 'win7.rc'}
and let Delphi compile it for you. That will also make it easier for you to change manifest as needed.
There's value in all the suggestions here -- they simplify. In the end, though, the problem was Aero Glass. "SheetOfGlass" had got enabled in the app's root form.
Remote Desktop is no substitute for seeing what an app really looks like.
The value of "themes" is debatable. My opinion is that an app should conform more or less to platform norms. I went down the theme path because that gets us "easy" support for text cues in text inputs.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.