vb中怎样才能双击托盘图标后直接显示程序?

vb程序最小化到托盘后鼠标双击托盘图标程序最小化到任务栏里,请问怎样才能双击后直接显示程序?
我是按你的代码做的
http://zhidao.baidu.com/question/434582369.html

Case WM_LBUTTONDBLCLK
Me.WindowState = 0 '加一句代码就可以了
Me.Show追问

在哪儿加?

追答

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static Message As Long

'x is the current mouse location along the x-axis
Message = X / Screen.TwipsPerPixelX

If RR = False Then
RR = True
Select Case Message
' Left double click (This should bring up a dialog box)
Case WM_LBUTTONDBLCLK
Me.Show '在这里加啊
' Right button up (This should bring up a menu)
Case WM_RBUTTONUP
' Me.PopupMenu mnuPopUp
End Select
RR = False
End If

End Sub

追问

ok了,非常感谢您。顺便帮我解决一下退出程序后图标还在托盘里 的问题,鼠标移动到图标才会消失。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-02-28
在窗口的双击事件中添加代码
me.show

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网