VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)

VB爱好者乐园(VBGood)

 找回密码
 立即注册
搜索
查看: 262|回复: 2

[求助] 已知某进程名如QQ.exe,怎么读取它托盘上的任何信息?

[复制链接]
发表于 2018-11-24 20:28:49 | 显示全部楼层 |阅读模式
如标题,请教老师,

点评

海!外直播 t.cn/RxmJTRa 禁闻视频 t.cn/RxkPOKC 人们对斯大林的评价:一个连言论都能治罪的政权,不要去相信它的任何宣传;一个连良心都能判刑的政权,不要去相信它的任何口号;一个枪口能对准平民的政权,不要去相信它   发表于 2018-11-30 23:10
发表于 2018-12-17 01:35:42 | 显示全部楼层
根据这个 修改下看看


'通用声名
Option Explicit
Private Type NOTIFYICONDATA
    cbSize As Long
    hWnd As Long
    uId As Long
    uFlags As Long
    ucallbackMessage As Long
    hIcon As Long
    szTip As String * 64
End Type
Private Const NIM_ADD = &H0
Private Const WM_MOUSEMOVE = &H200
Private Const NIF_MESSAGE = &H1
Private Const NIM_DELETE = &H2
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Dim t As NOTIFYICONDATA
‘窗口启动

t.cbSize = Len(t)
    t.hWnd = Picture1.hWnd
    t.uId = 1&
    t.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    t.ucallbackMessage = WM_MOUSEMOVE
    t.hIcon = Picture1.Picture
    t.szTip = "欢迎学习最酷VB百例 star-d@163.net" & Chr$(0)
    Shell_NotifyIcon NIM_ADD, t

’图片Mover

Private Sub picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Hex(X) = "1E3C" Then
           Me.PopupMenu Popup
    End If
End Sub
'程序退出 册除图表
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
t.cbSize = Len(t)
    t.hWnd = Picture1.hWnd
    t.uId = 1&
    Shell_NotifyIcon NIM_DELETE, t
End Sub
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

文字版|手机版|小黑屋|VBGood  

GMT+8, 2019-1-24 14:08

VB爱好者乐园(VBGood)
快速回复 返回顶部 返回列表