在一些碰到过的多媒体软件编制过程中通常需要彻底屏蔽任务条,通常的办法是调用ShowWindow(h,SW_hide)来隐藏任务条,但是不能屏蔽开始菜单,通过键盘的win功能键还是可以打开开始菜单,所以配合键盘钩子,来屏蔽开始菜单。
library HIDE;
uses
SysUtils,
Classes,
windows,
messages;
var
hHk :HHOOK;
type
PKBDLLHOOKSTRUCT = ^KBDLLHOOKSTRUCT;
KBDLLHOOKSTRUCT = record
vkCode: DWORD;
ScanCode: DWORD;
Flags: DWORD;
Time: DWORD;
dwExtraInfo: DWORD;
end;
{$R *.res}
function ycxsks( yc:Boolean): Boolean;stdcall; //隐藏-显示任务条
var
h:THandle;
begin
if yc = True then
begin
h:=FindWindow('Shell_TrayWnd',nil);
ShowWindow(h,SW_hide); //隐藏任务条
end
else<