任务栏的秘密(50分)

G

guoyan

Unregistered / Unconfirmed
GUEST, unregistred user!
我想通过程序把任务栏设置成自动隐藏,
这该怎么做?
 
right click taskbar--propertise---auto hide
a macro perhaps could help you.

from some site:

用下面的函数可以检查Win95的状态条是否处于自动隐藏状态。

============
uses ShellAPI;

(*
若状态条为自动隐藏状态,则返回值为 TRUE

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;
 
唉,你们真嘛烦,发给我你的email地址,我给个控件,不就全解决了...
 
一句话在 TForm.Active事件中加入
ShowWindow(Application.Handle, SW_HIDE);
万事大吉.开开心心.
 
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').
 
请提问者继续讨论此问题,如两天内无回应,此问题将结束!
 
我有完整的程序,如果需要的话mail给我

kug@990.net
 
D4的办法简单可行!
 
多人接受答案了。
 

Similar threads

回复
0
查看
656
不得闲
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
932
SUNSTONE的Delphi笔记
S
顶部