请问如何隐藏、显示任务栏?

Taken 2001-05-26 03:06:00
如何用程序来隐藏、显示Win xx的任务条?
怎样获得任务条的hWnd?
...全文
130 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
unruledboy 2001-05-26
  • 打赏
  • 举报
回复
如果不懂怎样给分,我教你:选中帖子右边的管理->尽情给我吧!
Taken 2001-05-26
  • 打赏
  • 举报
回复
一定一定:)
unruledboy 2001-05-26
  • 打赏
  • 举报
回复
兄弟,好就给分啦!!!
Taken 2001-05-26
  • 打赏
  • 举报
回复
非常详细呀!!!
还有多种解法
真不错*^_^*
limengchen 2001-05-26
  • 打赏
  • 举报
回复
隐藏任务栏:
Dim hWnd1 As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
隐藏的例子:
hWnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
显示的例子:
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
unruledboy 2001-05-26
  • 打赏
  • 举报
回复
对不起,掉了个:
end sub
unruledboy 2001-05-26
  • 打赏
  • 举报
回复
肯定能用,快点给分:-)
unruledboy 2001-05-26
  • 打赏
  • 举报
回复
Public Const SW_HIDE = 0
Public Const SW_SHOW = 5

Public Declare Function ShowWindow Lib "user32" (ByVal _
hwnd As Long, ByVal nCmdShow As Long) As Long

Public Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long


public sub ShowTaskBar(iShow as boolean)
hwnd = FindWindow("Shell_TrayWnd", vbNullString)
If iShow = True Then
ShowWindow hwnd, SW_SHOW
Else
ShowWindow hwnd, SW_HIDE
End If

Taken 2001-05-26
  • 打赏
  • 举报
回复
VB、Delphi我都喜欢:)
zhoujr 2001-05-26
  • 打赏
  • 举报
回复
我刚来,给点分吧!呵呵!
zhoujr 2001-05-26
  • 打赏
  • 举报
回复
我相信API肯定是可以的,具体就看看书吧! :)
jlum99 2001-05-26
  • 打赏
  • 举报
回复
看看这个
http://www.csdn.net/develop/read_article.asp?id=3287
不过是用delphi写地.
proking 2001-05-26
  • 打赏
  • 举报
回复
用API应该可以实现。你可以找一下API的书籍。

7,764

社区成员

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

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