VB程序最小化到托盘,但是点击托盘图标却弹不出来。 20

PrivateSubForm_Load()WebBrowser1.Silent=TrueWebBrowser1.Navigate"http://www.my-fm.cn/... Private Sub Form_Load()
WebBrowser1.Silent = True
WebBrowser1.Navigate "http://www.my-fm.cn/"
End Sub

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
Dim vdoc
Set vdoc = WebBrowser1.Document
For i = 0 To vdoc.All.length
If LCase(vdoc.All(i).Id) = "km" Then
MsgBox vdoc.All(i + 1).outertext & "||" & vdoc.All(i + 1).href
End If
Next i
End Sub

Private Sub Form_Resize()
If Form1.WindowState = 1 Then
nid.cbSize = Len(nid)
nid.uId = vbNull
nid.hWnd = Me.hWnd
nid.uFlags = NIF_TIP Or NIF_MESSAGE Or NIF_ICON
nid.uCallBackMessage = WM_MOUSEMOVE
nid.hIcon = Me.Icon
nid.szTip = "窗体最小化"
Shell_NotifyIcon NIM_ADD, nid
Me.Hide
End If
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim msg As Long
msg = X / 15
If msg = WM_LBUTTONDBLCLK Then
Me.Show
Shell_NotifyIcon NIM_DELETE, nid
End If
End Sub
展开
 我来答
hxf0663
2009-07-12 · TA获得超过909个赞
知道小有建树答主
回答量:1374
采纳率:0%
帮助的人:982万
展开全部
WM_LBUTTONDBLCLK 这是双击
用if msg=WM_LBUTTONUP then
Me.WindowState = 0
Me.Show
注意声明Const WM_LBUTTONUP = &H202
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式