# Re: 隐藏工作列

Posted by cww on February 25, 1998 at 17:49:39:

In Reply to: 隐藏工作列 posted by 阿晴 on February 25, 1998 at 05:47:53:

: 请问一下要如何在 Run-Time 的时候隐藏
: Windows 95 的工作列? 告诉我 API 的名
: 称就可以了. Thanks!
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Const SW_HIDE = 0
Const SW_NORMAL = 1
Private hWnd5 As Long

Private Sub Command1_Click() '隐藏
ShowWindow hWnd5, SW_HIDE
End Sub

Private Sub Command2_Click() '复原
ShowWindow hWnd5, SW_NORMAL
Me.SetFocus
End Sub

Private Sub Form_Load()
hWnd5 = FindWindow("Shell_traywnd", "") 'task bar的class name
End Sub '是Shell_traywnd

Follow Ups:

- 这样太狠了啦！ 小吴 23:56:06 2/25/98 (1)
  - 有同感 巨蟹座女子 19:58:33 2/26/98 (0)