Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByRef lParam As Any) As Long
Private Const WM_MOUSEACTIVATE As Long = &H21
Private Const WM_LBUTTONUP As Long = &H202
Private Const WM_LBUTTONDOWN As Long = &H201
Public Sub Main()
Dim a As New Form1
Dim b As New Form1
a.Show
a.Caption = "я - a"
b.Show
b.Caption = "я - b"
MsgBox "e"
a.ZOrder 0
b.ZOrder 0
SendMessage a.hwnd, WM_LBUTTONDOWN, 0, &H200020
DoEvents
SendMessage a.hwnd, WM_LBUTTONUP, 0, &H200020
DoEvents
End Sub
Public Sub Main()
Dim handle As Long
Dim a As New Form1
Dim b As New Form1
a.Show
a.Caption = "ÿ - a"
b.Show
b.Caption = "ÿ - b"
MsgBox "e"
handle = a.hwnd
a.ZOrder 0
b.ZOrder 0
SendMessage handle, WM_LBUTTONDOWN, 0, &H200020
DoEvents
SendMessage handle, WM_LBUTTONUP, 0, &H200020
DoEvents
SendMessage handle, WM_KEYDOWN, VK_1, 0
DoEvents
SendMessage handle, WM_KEYUP, VK_1, 0
DoEvents
End Sub
SendMessage wnd, WM_CHAR, Asc("1"), 0
SendMessage WindowFromPoint(Curs.X, Curs.Y), WM_LBUTTONDOWN, 0, &H200020
DoEvents
SendMessage WindowFromPoint(Curs.X, Curs.Y), WM_LBUTTONUP, 0, &H200020
DoEvents
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 24