禁用Windows的开始按钮
'

' Paste this into a Code Mode (BAS)
'
Option Explicit
'
private 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
'
private Declare Function EnableWindow Lib "user32" (byval hwnd as Long, _
       
byval fEnable as Long) as Long

public Sub EnableStartMenuButton(byval bEnable as Boolean)
'
' Don't forget to re-enable it !
'
    Dim lHwnd as Long
'
    lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
    lHwnd = FindWindowEx(lHwnd, 0&, "Button", vbNullString)
    Call EnableWindow(lHwnd, bEnable)
'
End Sub
'
'
posted on 2004-06-21 08:44  雪美·考拉  阅读(1222)  评论(1编辑  收藏  举报