Hi,
Open a New Project. Place A Command Button on the Form.
Copy and Paste this Code Form Level:
Option Explicit
'
Dim TFlag as Boolean
Private Declare Function FindWindowEx Lib "user32" _
Alias "FindWindowExA" (byval hWnd1 as Long, byval hWnd2 as Long, _
byval lpsz1 asstring, byval lpsz2 asstring) 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)
Dim lHwnd as Long
'
lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0&, "Button", vbNullString)
Call EnableWindow(lHwnd, bEnable)
'
End Sub
Write This Code In Form Load And Command Click Event:
Private Sub Form_Load()
TFlag = True
Command1.Caption = "Disable"
End Sub
Private Sub Command1_Click()
TFlag = Not TFlag
Command1.Caption = "Enable"
EnableStartMenuButton (TFlag)
End Sub
Dont Ever Forget To Enable Back the Start Button. :)
Regards
Veena