# 关于 SHAppBarMessage API 的问题...

Posted by SATURNBOY on June 13, 1997 at 21:18:32:

HI! 小吴, 我有个问题请教..(在CWin95a, vb6下)

SHAppBarMessage 这个API是否可以把Win95的TaskBar的"自动隐藏"给Enabled?
我有在Microsoft Knowledge Base找到关于这个API的说明(http://www.microsoft.com/kb/articles/q143/1/17.htm), 看起来似乎可以(它的范例只有说明如何判断TaskBar所在的状态), 所以我就写了以下程式, 可是无用, 不知是否我有写错? Thank you..
程式码: (按了Command1 能使TaskBar的"自动隐藏"给Enabled)
1.在 Module1.Bas
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Type APPBARDATA
cbSize As Long
hwnd As Long
uCallbackMessage As Long
uEdge As Long
rc As RECT
lParam As Long
End Type

Public Declare Function SHAppBarMessage Lib "shell32.dll" (ByVal _
dwMessage As Long, pData As APPBARDATA) As Long

Public Const ABM_SETAUTOHIDEBAR = &H8

2.在Command1
Private Sub Command1_Click()
Dim Bardata As APPBARDATA
'Bardata 是不是要设定值?
Call SHAppBarMessage(ABM_SETAUTOHIDEBAR, Bardata)
End Sub

Follow Ups:

- 下周一回答你 小吴 01:01:44 6/14/97 (1)
  - 不行 小吴 19:20:13 6/15/97 (0)