導航:首頁 > 編程知識 > 如何編程qq收到信息

如何編程qq收到信息

發布時間:2025-01-06 08:21:44

⑴ 如何用VB或讀取QQ消息

VB讀取QQ消息,依次讀取QQ消息窗口
01 Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
02 Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVallpWindowName As String) As Long
03 Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVallpString As String, ByVal cch As Long) As Long
04 Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVallpClassName As String, ByVal nMaxCount As Long) As Long
05 Private Const GW_CHILD = 5
06 Private Const GW_HWNDNEXT = 2
07 Private Sub Command1_Click()
08 Dim hWin As Long
09 Dim strText As String
10 Dim strClass As String
11 Dim arr(1 To 5) As String
12 Dim flag As Integer
13 Dim length As Integer
14 flag = 1
15 List1.Clear
16 '第一個QQ消息窗口
17 hWin = FindWindow("CTXOPConntion_Class", vbNullString)
18 If hWin = 0 Then Exit Sub
19 Do
20 strText = String$(50, vbNullChar)
21 GetWindowText hWin, strText, Len(strText)
22 strText = Left$(strText, InStr(strText, vbNullChar) - 1)
23 If InStr(strText, "OP_") = 1 Then
24 strText = Mid$(strText, 4)
25 List1.AddItem strText
26 arr(flag) = strText
27 flag = flag + 1
28 End If
29 Do
30 '下一個窗口
31 hWin = GetWindow(hWin, GW_HWNDNEXT)
32 If hWin = 0 Then Exit Do
33 strClass = String$(50, vbNullChar)
34 GetClassName hWin, strClass, Len(strClass)
35 strClass = Left$(strClass, InStr(strClass, vbNullChar) - 1)
36 Loop While strClass <> "CTXOPConntion_Class"
37 Loop While hWin
38 List1.Text = strText
39 End Sub

閱讀全文

與如何編程qq收到信息相關的資料

熱點內容
裝載文件時出現問題win10 瀏覽:996
微信領紅包找不到網頁 瀏覽:76
蘋果電腦復制文件到u盤 瀏覽:751
wps圖片怎麼轉為文件 瀏覽:845
順義區手動網站建設多少錢 瀏覽:234
微信農業銀行說沒開通信息服務 瀏覽:640
qq企業郵箱登錄首頁 瀏覽:523
rc資源腳本文件名rc 瀏覽:750
Win10文件夾被覆蓋 瀏覽:810
陽江企業網站推廣需要多少錢 瀏覽:69
手機那些文件夾可以刪 瀏覽:866
c語言匯編程序屬於什麼軟體 瀏覽:895
如何找回iphone原相機app 瀏覽:333
迷你編程五關怎麼過 瀏覽:487
java模擬post提交 瀏覽:790
安卓手機移動網路ip 瀏覽:763
文件自己變成excel怎麼弄 瀏覽:644
怎麼在手機里文件 瀏覽:21
linux復制文件名 瀏覽:996
sql資料庫共享 瀏覽:888

友情鏈接