如何设置任务条自动隐藏?

spacespy 2000-02-22 10:32:00
如何设置任务条自动隐藏?(通过API SHAppBarMessage)
请给出具体程序。多谢!!!
...全文
140 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
spacespy 2000-02-29
  • 打赏
  • 举报
回复
w102272 & longzu :
首先非常感谢你们的意见!
但是我要的是自动隐藏(也就是说鼠标移到屏幕底下的时候任务条就会自动弹出)!
我知道是用SHAppBarMessage这个函数,但是具体怎么做?
希望你们能给出具体的例子好吗?万分感谢!!!
longzu 2000-02-23
  • 打赏
  • 举报
回复
w102272是对的。
这样的代码在网上还有很多,你可以自己去找找!我曾经用过,可是除非程序中在显示,否则任务栏不会自动再显示出来!
w102272 2000-02-23
  • 打赏
  • 举报
回复
//利用 FindWindowA 通过任务栏的名称(Shell_TrayWnd)获得它的句柄
//利用 SetWindowPos 的参数来设置状态: 128 隐藏,64 不隐藏

//声明这些外部函数
//Function long FindWindowA (ref string lpClassName, ref string lpWindowName ) Library "user32.dll"
//Function long SetWindowPos (long handleW1, long handleW1InsertWhere , long x,long y , long cx, long cy , long uFlags) Library "user32.dll"

//常量定义
long ABM_GETSTATE = 4
long ABS_AUTOHIDE = 1
long ABS_ALWAYSONTOP = 2

integer iihide = 128
integer iiunhide = 64
string is_TrayWnd = "Shell_TrayWnd"

//隐藏或者显示
string ls
long llhandle_taskbar
ls = ""

if ab_hide then //hide
llhandle_taskbar = FindWindowA(ref is_TrayWnd , ref ls)
SetWindowPos(llhandle_taskbar, 0, 0, 0, 0, 0, iihide)
else //unhide
llhandle_taskbar = FindWindowA(ref is_TrayWnd , ref ls)
SetWindowPos(llhandle_taskbar, 0, 0, 0, 0, 0, iiunhide)
end if

1,075

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧