下面的代码就可以轻松搞定。
Private Const SWP_HIDEWINDOW = &H80
Private Const SWP_SHOWWINDOW = &H40
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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
Private Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd
Public Sub ViewTaskBar(lbValue As Boolean)
Dim llResult As Long
llResult = FindWindow("Shell_traywnd", "")
If llResult Then
If lbValue Then
llResult = SetWindowPos(llResult, 0, 0, 0, 0, 0, SWP_SHOWWINDOW) Else llResult = SetWindowPos(llResult, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End If
End If
End Sub
调用过程ViewTaskBar,lbValue为false时隐藏任务栏。
使本程序不出现在Windows的结束任务对话框中 (win9x) | 利用VB捕捉并保存屏幕图像 |
隐藏任务栏 | |
[ 发布日期:21年前 (2004-08-06) ] [ 来自:Original ] | [分类:VB相关] |
[ 分类:VB相关
| 查看:2074 ]
暂时没有评论,快来发表一个评论吧。
发表评论 |