Author: Tomas Rutkauskas How to use the alpha transparency features included in Windows 2000 and XP Answer: 1 { ... } 2 const 3 WS_EX_LAYERED = $80000; 4 LWA_COLORKEY = 1; 5 LWA_ALPHA = 2; 6 7 type 8 TSetLayeredWindowAttributes = function( 9 hwnd: HWND; {handle to the layered window} 10 crKey: TColor; {specifies the color key} 11 bAlpha: byte; {value for the blend function} 12 dwFlags: DWORD {action} 13 ): BOOL; stdcall; 14 15 procedure TfBaseSplash.FormCreate(Sender: TObject); 16 var 17 Info: TOSVersionInfo; 18 F: TSetLayeredWindowAttributes; 19 begin 20 inherited; 21 Info.dwOSVersionInfoSize := SizeOf(Info); 22 GetVersionEx(Info); 23 if (Info.dwPlatformId = VER_PLATFORM_WIN32_NT) and (Info.dwMajorVersion >= 5) then 24 begin 25 F := GetProcAddress(GetModulehandle(user32), 'SetLayeredWindowAttributes'); 26 if Assigned(F) then 27 begin 28 SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) 29 or WS_EX_LAYERED); 30 F(Handle, 0, Round(255 * 80 / 100), LWA_ALPHA); 31 end; 32 end; 33 end;