BOOL SetLayeredWindowAttributes(
HWND hwnd, // handle to the layered window
COLORREF >crKey, // specifies the color key
BYTE bAlpha, // value for the blend function
DWORD dwFlags // action
);
(从msdn里抄来的)这个API来自User32.dll,且只有windows2000以上版本才支持。Delphi6封装了这个API,如果你用的是Delphi5就要自己写上一句:
function SetLayeredWindowAttributes(hwnd:HWND; crKey:Longint; bAlpha:byte; dwFlags:longint ):longint; stdcall; external ‘user32.dll';