∵ .ucallbackmessage = WM_USER + 100
∴ If umsg=WM_USER + 100 ThenIf wparam = umsg=WM_USER + 100 Then
Select Case lparam
Case wm_lbuttondblck '双击左键
If Form1.mnustart1.Caption = "&start server" Then
With pnid
.hicon = Form1.Picture1.Picture
.sztip = "web server start" & Chr(0)
End With
Form1.mnustart.Caption = "& stop server"
Form1.mnustart1.Caption = "&stop server"
Form1.Icon = Form1.Picture1.Picture
Else
With pnid
.hicon = Form1.Picture2.Picture
.sztio = "web server stop" & Chr(0)
End With
Form1.mnustart.Caption = "&start server"
Form1.mnustart1.Caption = "&start server"
Form1.Icon = Form1.Picture2.Picture
End If
Shell_NotifyIcon NIM_MODIFY, pnid
Case wm_rbuttondown
Form1.PopupMenu Form1.mnutray, vbpopupmenurightallign, , ,Form1.mnustart1 '弹出mnutray菜单
End Select
End If
∴ If umsg=WM_USER + 100 ThenIf wparam = umsg=WM_USER + 100 Then
Select Case lparam
Case wm_lbuttondblck '双击左键
If Form1.mnustart1.Caption = "&start server" Then
With pnid
.hicon = Form1.Picture1.Picture
.sztip = "web server start" & Chr(0)
End With
Form1.mnustart.Caption = "& stop server"
Form1.mnustart1.Caption = "&stop server"
Form1.Icon = Form1.Picture1.Picture
Else
With pnid
.hicon = Form1.Picture2.Picture
.sztio = "web server stop" & Chr(0)
End With
Form1.mnustart.Caption = "&start server"
Form1.mnustart1.Caption = "&start server"
Form1.Icon = Form1.Picture2.Picture
End If
Shell_NotifyIcon NIM_MODIFY, pnid
Case wm_rbuttondown
Form1.PopupMenu Form1.mnutray, vbpopupmenurightallign, , ,Form1.mnustart1 '弹出mnutray菜单
End Select
End If
解决方案 »
- ACCESS与SQL
- 100分在线等候,救命求救:问什么下面的代码打不出来横板的东西?
- 各位,有没人知道vb调用matlab是怎么样实现的?
- 怎样可以设置MSHFlexGrid控件每次只能选择一格,也就是说不能整片的选中。
- 为何出现这样的结果?
- 文本文件换行用的是chr(10)(换行符),没有回车,line input不好使了,怎么办?
- 如何在一个程序的设计中,建立一个文件?以便被这个程序调用???
- 小问题:请问如何将一个窗体最小化时只显示在任务栏右边的System tray里?
- 双击后,选种listbox中的一个记录,如何保证再次双击时,这条记录不在被重复选种
- 既然应用程序的查询通常是用SQL动态实现,为什么还需要建立后台数据库的视图对象?
- API的初级问题 高分酬谢
- Distinct关键词的问题,急.....高分奉送.
http://www.applevb.com/sourcecode/Bar.zip
上面是一个在任务栏添加图标的程序,你可以参考一下。