我试图使用" 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中使我的安装程序略微透明?