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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start Menu

Status
Not open for further replies.

sefafo

Programmer
Aug 28, 2003
36
0
0
CO
Hello!!
Anybody Knoes how to activate / deactivate the Star Menu from visual Basic??

Thanks a lot..
 

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

Private Function Enable_WindowsXP_StartButton(Status as Boolean)
Dim zhWnd As Long
zhWnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString): zhWnd = FindWindowEx(zhWnd, 0&, "Button", vbNullString)
Call EnableWindow(zhWnd, Status)
End Function


'Use this Function Like This
Call Enable_WindowsXP_StartButton(False) 'To Disable Start Menu
Call Enable_WindowsXP_StartButton(True) 'To Disable Start Menu

If this code is used in a project of your give credit to the coder "ME!"

just put start menu function by dweidner@ctelcom.net in your readme
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top