Re: Theme colors in the Vista era
- From: "Andrew Fiddian-Green" <ho ho ho>
- Date: Fri, 6 Oct 2006 00:45:08 +0200
Office 2003 didn't ignore the theme. When using the blue Luna theme Ofiice
showed up very blue, when Olive then olivish, when silver then silver
grey, and when classic then plain grey.
I use the following code. But frankly I don't know if the "if
fWinVistaUpwards..." bit will be sufficient...
if IsThemed then
begin
Result := tsOffice2003Classic;
hinstDll := LoadLibrary('uxtheme.dll');
if hinstDll <> 0 then
begin
try
GetCurrentThemeName := GetProcAddress(hinstDll,
'GetCurrentThemeName');
if Assigned(GetCurrentThemeName) then
begin
SetLength(FileName, 255);
SetLength(ColorScheme, 255);
SetLength(SizeName, 255);
GetCurrentThemeName(PWideChar(FileName), 255,
PWideChar(ColorScheme), 255, PWideChar(SizeName), 255);
if fWinVistaUpwards then
begin
Result := tsOffice2007Luna;
if (PWideChar(ColorScheme) = 'NormalColor') then
begin
Result := tsOffice2007Obsidian;
end;
end
else
begin
Result := tsOffice2003Classic;
if (PWideChar(ColorScheme) = 'NormalColor') then
begin
Result := tsOffice2003Blue;
end
else
if (PWideChar(ColorScheme) = 'HomeStead') then
begin
Result := tsOffice2003Olive;
end
else
if (PWideChar(ColorScheme) = 'Metallic') then
begin
Result := tsOffice2003Silver;
end;
end;
end;
finally
FreeLibrary(hinstDll);
end;
end;
end
else
begin
Result := tsWindowsXP;
end;
end;
.
- References:
- Theme colors in the Vista era
- From: Eric Grange
- Re: Theme colors in the Vista era
- From: Ottar Holstad
- Theme colors in the Vista era
- Prev by Date: Re: Why aren't you upgrading?
- Next by Date: Re: Turbo Delphi made with???
- Previous by thread: Re: Theme colors in the Vista era
- Next by thread: Re: Theme colors in the Vista era
- Index(es):