导航:首页 > 编程知识 > 如何编程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收到信息相关的资料

热点内容
手机里暴风隐藏文件路径 浏览:49
win10备份系统文件好大 浏览:293
js导出html到excel 浏览:725
c游戏编程用什么软件 浏览:645
java依赖倒置 浏览:166
华为畅玩5x微信运动 浏览:819
applepay必须改美国时间 浏览:893
max文件默认打开方式 浏览:466
拆迁农民要看的有哪些文件 浏览:351
苹果手机铃声的文件后缀 浏览:352
什么东西代表了编程 浏览:698
网络中心如何关闭 浏览:258
k3编程是什么意思 浏览:296
vba和sql数据库哪个好 浏览:38
u启王u盘启动盘制作工具 浏览:228
深入理解android网络编程 浏览:615
javah无法访问 浏览:11
keyvalue内存数据库 浏览:446
2016年淘宝店铺装修教程 浏览:394
哪个地区把编程纳入高考范围中了 浏览:327

友情链接