導航:首頁 > 編程知識 > 如何編程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收到信息相關的資料

熱點內容
ctrlz文件找不到了 瀏覽:694
qq群5分鍾退群了沒退錢 瀏覽:845
應用程序無法右鍵打開 瀏覽:613
寒假網路安全是什麼 瀏覽:857
java數組動態賦值 瀏覽:668
linux如何查看cpu參數 瀏覽:796
word文件下拉卡頓 瀏覽:537
將桌面上的文件另存路徑是什麼 瀏覽:978
網路兼職做什麼掙錢 瀏覽:438
金華靠譜網站建設公司有哪些 瀏覽:210
後綴名為數字的壓縮文件如何解壓 瀏覽:567
買積木哪個網站好 瀏覽:78
win10efi分區恢復 瀏覽:614
商家微信支付模板 瀏覽:787
美國有哪些黃動漫網站 瀏覽:919
ecshop第三方登錄管理教程 瀏覽:753
易通文件夾鎖軟體免費下載 瀏覽:538
電腦文件夾字體透明的 瀏覽:937
哪些免費招聘網站 瀏覽:748
提升英語聽力的app有哪些 瀏覽:665

友情鏈接