| Код | Option Explicit
Private Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" _ (ByVal hwnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ ByVal lParam As Long) As Long
Private Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) Private Declare Function FindWindowEx& Lib "user32" Alias "FindWindowExA" (ByVal hWndParrent As Long, ByVal hWndChildren As Long, ByVal lpClassName As String, ByVal lpWindowName As String)
Private Sub Command1_Click() Dim sCaption As String, hW As String
Const WM_KILLFOCUS = &H8
sCaption = "Form1" hW = FindWindow(vbNullString, sCaption)
' Как заставить работать эту строку: Call SendMessage(hW, WM_KILLFOCUS, <ByVal???> , 1)
End Sub
| |