注意,该功能只能在 WIN2K 下运行。<br><br>const user32 = 'user32.dll'; <br>WS_EX_LAYERED = $00080000; <br>LWA_ALPHA = $00000002;<br>function SetLayeredWindowAttributes(hWnd: HWND;<br> crKey: TColorRef; <br> bAlpha: Byte; <br> dwFlags: DWord): BOOL; stdcall; <br> external user32<br> name 'SetLayeredWindowAttributes';<br>var l:longint;<br>begin <br>l:=getWindowLong(Handle, GWL_EXSTYLE);<br> l := l Or WS_EX_LAYERED; <br> SetWindowLong (handle, GWL_EXSTYLE, l);<br> SetLayeredWindowAttributes(handle, 0, 200, LWA_ALPHA); <br> ^^^ 透明度end;