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;
(*
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. Download tbah.pas (0.36 KB).
#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;
}
//
// Returns >0 if taskbar auto hide is on.
//
int IsTaskbarAutoHideOn()
{
APPBARDATA ABData;
ABData.cbSize = sizeof(ABData);
return
SHAppBarMessage(ABM_GETSTATE, &ABData)
& ABS_AUTOHIDE;
}
Listing #2 : C/C++ code. Download tbah.cpp (0.31 KB).
0 comments:
Post a Comment