Const GW_CHILD = 5
Const GW_HWNDNEXT = 2
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
Private Const WM_LBUTTONDOWN = &H201
Dim tWnd As Long, bWnd As Long, sSave As String * 250
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'This code will hide the Start-button
'Find the taskbar's handle
tWnd = FindWindow("Shell_traywnd", vbNullString)
'Search for a child window
bWnd = GetWindow(tWnd, GW_CHILD)
Do
'get the child window's classname
GetClassName bWnd, sSave, 250
'We have the handle of the Start button If the classname is 'button'
If LCase(Left$(sSave, 6)) = "button" Then Exit Do
'Search the next child
bWnd = GetWindow(bWnd, GW_HWNDNEXT)
Loop
'Hide the start button
'SetWindowPos bWnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
SendMessage bWnd, WM_LBUTTONDOWN, vbNull, vbNull
End Sub
Сейчас этот форум просматривают: AhrefsBot, Yandex-бот и гости: 65