use CJ's instruction to get the current AppBar state. After that, you
can use following code to change it:
ABData.uCallbackMessage:=nil;
ABData.lParam:=1;//AutoHide 0=Stay on top.
ReturnValue := SHAppBarMessage(ABM_SETAUTOHIDEBAR, ABData);
if ReturnValue > 0 then
showmessage('SetAutohide is successful')
else ('Con not SetAutohide').