如何使我的安装程序略微透明

时间:2015-11-07 05:13:18

标签: inno-setup

我试图使用" SetLayeredWindowAttributes"使我的安装程序略微透明,但是当我运行此代码时,安装程​​序没有任何反应。

[setup]
AppName=Transparent
AppVerName=1.0
DefaultDirName={pf}\program

[Files]
Source: "Untitled.png"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression

[Code]
function SetLayeredWindowAttributes(
  hwnd: HWND;
  crKey: TColor;
  bAlpha: BYTE;
  dwFlags: DWORD
): Boolean;
external 'SetLayeredWindowAttributes@user32.dll stdcall';

Const
TransparentPercent = 20;
LWA_COLORKEY = 1;

procedure InitializeWizard();
begin
 SetLayeredWindowAttributes(WizardForm.Handle, clLime,(255 * TransparentPercent) / 100, LWA_COLORKEY);
end;

如何在Inno Setup中使我的安装程序略微透明?

0 个答案:

没有答案