Searching...
9:07 PM

Start button enable/disable vb6 code

Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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

hWnd2 = FindWindow("Shell_TrayWnd", "")
hWnd2 = FindWindowEx(hWnd2, 0, "Button", vbNullString)

    'enable
        EnableWindow hWnd2, False
    'disable
        EnableWindow hWnd2, True

0 comments:

Post a Comment

 
Back to top!