Option Explicit
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function WindowFromPoint Lib "user32.dll" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Public Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Public Const WM_CLOSE = &H10
Sub Main()
Dim hwnd As Long, slength As Long
slength = 0
Do While slength = 0
hwnd = WindowFromPoint(500, 350)
slength = GetWindowTextLength(hwnd)
If slength = 0 Then SendMessage hwnd, WM_CLOSE, 0, 0
Loop
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 50