[Code] const TransparentPercent = 50; // процент прозрачности function SetLayeredWindowAttributes(hwnd: HWND; crKey: TColor; bAlpha: BYTE; dwFlags: DWORD): Boolean; external 'SetLayeredWindowAttributes@user32.dll stdcall'; function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall'; function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
Procedure InitializeWizard(); begin SetWindowLong(WizardForm.Handle,(-20),GetWindowLong(WizardForm.Handle,(-20)) or $80000); SetLayeredWindowAttributes(WizardForm.Handle, 0,(255 * TransparentPercent) / 100, 2); end;
|