Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enabling/Disabling Start Button on Windows 2000

Status
Not open for further replies.

jkzee

IS-IT--Management
Oct 8, 2002
6
US
I am looking for the API(s) and sample code that I can use that will allow me to enable and disable the windows start button. The reason is I am helping a friend of mine whose primary tech support person recently passed away, and he disables the start button upon loging (I assume). I was hoping to:

1) understand how that can happen
2) have a temp solution to enable it to perform some admin task - such as backup the server

Any help would be appreciated. Thank you.
 
Okay, I found a code that will enable/disable the start button - but does anyone know he may be disabling it during startup? Need to check, but the possible ways I'm familar with are:

1) executing program to disable during startup

???

Thanks
 
BTW...here's the code:

'
' 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top