vb 右键托盘菜单无法取消
PrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)DimlMsgAs...
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lMsg As Single
lMsg = X / Screen.TwipsPerPixelX
Select Case lMsg
Case WM_LBUTTONUP '左键事件
'MsgBox "请用鼠标右键点击图标!", vbInformation, "实时播音专家"
'单击左键,显示窗体
If Pass = "" And User = "" Then
ShowWindow Me.hwnd, SW_RESTORE
Shell_NotifyIcon NIM_DELETE, tray '程序关闭时触发,删除任务栏图标
Else
Form5.Show
End If
Case WM_RBUTTONUP '右键事件
PopupMenu yjcd '显示菜单
End Select
End Sub
我是用vb制作托盘那个代码弄托盘右键菜单的,但是菜单虽然显示出来了,点桌面的时候竟然不消失,一直在那里显示着(除非选择其中一个),怎么办
xjcs@vip.qq.com 展开
Dim lMsg As Single
lMsg = X / Screen.TwipsPerPixelX
Select Case lMsg
Case WM_LBUTTONUP '左键事件
'MsgBox "请用鼠标右键点击图标!", vbInformation, "实时播音专家"
'单击左键,显示窗体
If Pass = "" And User = "" Then
ShowWindow Me.hwnd, SW_RESTORE
Shell_NotifyIcon NIM_DELETE, tray '程序关闭时触发,删除任务栏图标
Else
Form5.Show
End If
Case WM_RBUTTONUP '右键事件
PopupMenu yjcd '显示菜单
End Select
End Sub
我是用vb制作托盘那个代码弄托盘右键菜单的,但是菜单虽然显示出来了,点桌面的时候竟然不消失,一直在那里显示着(除非选择其中一个),怎么办
xjcs@vip.qq.com 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询