Form designer is incompatible in control display style for updated project

I have a project I started in Turbo Delphi that I recently upgraded to D2009 and I noticed a bit of a quirk in the form designer. All older forms have the Win98 style applied to them. For example, buttons are gray with sharp square edges. But any new form I've created since the update displays its WinXP style controls. If I copy a control from the old form and paste it into the new one, the style changes. At run time, all controls from all forms are rendered in XP style.

Any idea what is causing my old forms to show in the old style? I have looked through the list of properties, but nothing jumps out at me. But something is obvious and it is persistent because saving and reloading does not change it. Does anyone know where this property is and how I can fix it?

+1


source to share


5 answers


You must include runtime themes.

Have you checked it?



Project | Options | Application | [  ]  Enable Run Time Themes

      

+2


source


considers the clause uses both in the old form and in the new one, maybe something else. I know that in delphi 7 you had to add xpman (or something similar) to get the Windows skin.



+1


source


Have you checked the dfm files? Sometimes there is something that doesn't appear in the property list.

0


source


Perhaps you have a parasitic Ctl3D (sp?) Setting in your dfm?

0


source


Well, using D2007,

had the same problem in my runtime packages. They can create using D5 or D7.

To fix this problem: just add "XP Theme ManiFest" to the "res" file of the "C" package.

Example of D2007 manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity
    type="win32"
    name="CodeGear RAD Studio"
    version="11.0.2902.10471" 
    processorArchitecture="*"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        publicKeyToken="6595b64144ccf1df"
        language="*"
        processorArchitecture="*"/>
    </dependentAssembly>
  </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"/>
        </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

      

0


source







All Articles