Excel :如何隐藏"开始"菜单?
网友gril问到:
请帮我看看如何隐藏"开始"菜单好吗?
我新开一个主题示说明如何隐藏"开始"菜单
这还是要调用API函数才行
Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Const SW_SHOW = 5 '显示窗口
Public Const SW_HIDE = 0 '隐藏窗口
'-----------------------------------------------------------------------------
Sub ShowStar()
Dim TaskBarhwnd As Long, Buttonhwnd As Long
TaskBarhwnd = FindWindow("Shell_TrayWnd", vbNullString)
Buttonhwnd = FindWindowEx(TaskBarhwnd, 0, "Button", vbNullString)
ShowWindow Buttonhwnd, SW_SHOW
End Sub
'-------------------------------------------------------------------------------
Sub HideStar()
Dim TaskBarhwnd As Long, Buttonhwnd As Long
TaskBarhwnd = FindWindow("Shell_TrayWnd", vbNullString)
Buttonhwnd = FindWindowEx(TaskBarhwnd, 0, "Button", vbNullString)
ShowWindow Buttonhwnd, SW_HIDE
End Sub