【发布时间】:2011-09-24 15:04:52
【问题描述】:
一直在尝试使用以下代码来检查是否启用了 Windows Aero:
function AeroEnabled: boolean;
var
enabled: bool;
begin
// Function from the JwaDwmapi unit (JEDI Windows Api Library)
DwmIsCompositionEnabled(enabled);
Result := enabled;
end;
...
if (CheckWin32Version(5,4)) and (AeroEnabled) then
CampaignTabs.ColorBackground := clBlack
else begin
GlassFrame.Enabled := False;
CampaignTabs.ColorBackground := clWhite;
end;
但是,在 pre-vista 机器上这样做会导致应用程序崩溃,因为 DWMApi.dll 丢失。我也尝试过this code,但它会连续产生 2 个 AV。我怎样才能做到这一点 ?我正在使用 Delphi 2010。:)
【问题讨论】:
标签: delphi aero dwm jedi-code-library