Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


Is Windows taskbar's auto hide feature enabled?


Reply
Views: 1165  
Thread Tools Rate Thread
  #1  
Old 08-09-2010, 12:35 PM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default Is Windows taskbar's auto hide feature enabled?

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. Download tbah.pas (0.36 KB).


C Language / C++ CODE
#include

//
// 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).

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)