2
votes

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:

  • Made with XE8, Win32, current Raize components
  • XPMan removed along the way
  • "Enable themes" is "on" in all configs, Metropolis checked, Windows is set as the default theme in Appearance.
  • A recent small app with some Raize components looks fine, and I've tried to follow the pattern laid down by this app.
  • Truths:

    1. I've been carrying this app around since Delphi 1; I may have rebuilt the project source around Delphi 2 but other than that, I haven't messed with the dproj file much.
    2. I suspect I'll have to focus on the resource compile bit. The only resources I know are the icon and the manifest, and I'd guess the manifest is the real problem here. I removed "XPMan" about a month ago but did not deploy until this morning.

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>
3
It looks like you've tried everything you found on google all at once. What do you want to achieve? Why Metropolis? Why VCL styles? - David Heffernan
@DavidHeffernan Really yesterday was a day of change, test, verify, next. The first focus was to remove theme support entirely. That never produced the app's original look so made me doubt the view of the configs and their application by the tools. In fact, restoring dproj to its condition prior to this work also failed to restore a sane GUI. So I take the view that theme support is here and matters to future Windows versions, so better to endure -- to get control of it now. Metro is there because dox say something has to be selected even when you want to use "Windows" theme. - Frank Burleigh
You would be far better served by going back to where you were before you made all these changes, and not changing stuff at random. - David Heffernan
No, for a VCL application Metro should not be selected. Go to Project->Options->Applications->Appearance, make sure everything in the Custom Styles list is unchecked, and then set the combobox for Default Style to Windows. Also remove the Application.UseMetropolisUI; line from the DPR. (You can actually remove the Vcl.Styles unit as well.) - Ken White

3 Answers

3
votes

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.

3
votes

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).

2
votes

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.

Side notes

  • 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.