JohnK писал(а):Глобальный вопрос: зачем?
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Command1_Click()
Dim handle as long
handle = FindWindow(vbNullString, "Заголовок окна")
SetForegroundWindow (handle)
keybd_event vbKeyF6, 0, 0, 0
keybd_event vbKeyF6, 0, 2, 0
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 72