?? win2k.pas
字號:
unit Win2k;
interface
uses
Windows;
const
WS_EX_LAYERED = $00080000;
LWA_ALPHA = $00000002;
type
FAnimateWindow = function(const hwnd: HWND; const dwTime: DWORD; const dwFlags: DWORD):DWORD; stdcall;
FSetLayeredWindowAttributes = function(hWnd: HWND; crKey: DWORD; bAlpha: Byte; dwFlags: DWORD): BOOL; stdcall;
function AnimateWindow(const hwnd: HWND; const dwTime: DWORD; const dwFlags: DWORD):DWORD;
function SetLayeredWindowAttributes(hwnd: HWND; crKey: DWORD; bAlpha: Byte; dwFlags: DWord): BOOL;
implementation
function AnimateWindow(const hwnd: HWND; const dwTime: DWORD; const dwFlags: DWORD):DWORD;
var
DLLHandle : THandle;
AnimateWindow : FAnimateWindow;
begin
Result := 0;
DLLHandle := LoadLibrary('user32.dll');
if DLLHandle <> 0 then begin
@AnimateWindow := GetProcAddress(DLLHandle,'AnimateWindow');
if @AnimateWindow <> nil then begin
Result := AnimateWindow(hwnd,dwTime,dwFlags);
end;
end;
end;
function SetLayeredWindowAttributes(hwnd: HWND; crKey: DWORD; bAlpha: Byte; dwFlags: DWORD): BOOL;
var
DLLHandle : THandle;
gwlStyle : Longint;
SetLayeredWindowAttributes : FSetLayeredWindowAttributes;
begin
Result := false;
DLLHandle := LoadLibrary('user32.dll');
if DLLHandle <> 0 then begin
@SetLayeredWindowAttributes := GetProcAddress(DLLHandle,'SetLayeredWindowAttributes');
if @SetLayeredWindowAttributes <> nil then begin
gwlStyle := GetWindowLong(hwnd,GWL_EXSTYLE);
gwlStyle := gwlStyle or WS_EX_LAYERED;
SetWindowLong(hwnd,GWL_EXSTYLE,gwlStyle);
Result := SetLayeredWindowAttributes(hWnd,crKey,bAlpha,dwFlags);
end;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -