发信人: CF (随风漂), 信区: BorlandDev
标 题: Is Windows taskbar's auto hide feature enabled?
发信站: 哈工大紫丁香 (2002年12月29日22:06:43 星期天), 站内信件
? How to navigate the taskbar without a mouse (Windows tip)
Want to know if the Windows taskbar's auto hide feature is enabled?
Here's a simple function to check this written in C Language / C++ and
Delphi.
Delphi CODE
uses ShellAPI;
(*
Returns TRUE if taskbar auto hide is on.
if(IsTaskBarautoHideOn)then
begin
// auto hide is ON
end;
*)
function IsTaskbarAutoHideOn : boolean;
var
ABData : TAppBarData;
begin
ABData.cbSize := sizeof(ABData);
Result :=
(SHAppBarMessage(ABM_GETSTATE, ABData)
and ABS_AUTOHIDE) > 0;
end;
Listing #1 : Delphi code. Right click tbah_pas.pas to download.
C Language / C++ CODE
#include<shellapi.h>
//
// Returns >0 if taskbar auto hide is on.
//
int IsTaskbarAutoHideOn()
{
APPBARDATA ABData;
ABData.cbSize = sizeof(ABData);
return
SHAppBarMessage(ABM_GETSTATE, &ABData)
& ABS_AUTOHIDE;
}
--
再不学习,你就要......
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 218.10.130.13]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:9.144毫秒