1.vb 解å¯ç å°ç¨åº
vb 解å¯ç å°ç¨åº
å¦ä¸ä¸ªç¨åºä¸ç代ç
Private Declare Function SendMessage Lib "user" Alias "SendMessageA" (ByVal hwnd As Long,新纪元源码试炼 ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Declare Function FindWindow Lib "user" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Sub Command2_Click()
Dim hwnd As Long, t As Long, s As String * â声æåéhwndãt为é¿æ´å½¢ï¼s为 个å符çå符ååéï¼æå¥æä¿åå¨hwndä¸
hwnd = FindWindow(vbNullString, "HJonny")'寻æ¾å为HJonnyççªä½æ é¢ï¼è¿éå°±æ¯å¦ä½ ç第ä¸ä¸ªå¯ç ç¨åºã
t = FindWindowEx(hwnd, 0, "ThunderRT6TextBox", vbNullString)'è¿ä¸ªæ¯å¯»æ¾å ¶ä¸çä¸ä¸ªææ¬æ¡ï¼ä¹å°±æ¯è¿·å¾å¯ç æ¡çå¥æï¼ä¿åå¨tä¸
SendMessage t, , , s'sendmassageåtå¥æï¼ä¹å°±æ¯ä½ çå¯ç æ¡ä¸çææ¬å 容ã
MsgBox s'å¼¹åºæ示
End Sub
èªå·±åä¸å¤å¶ï¼äººå好ï¼å¸æè½å¸®å°ä½