vb 托盘图标单击显示窗口用的什么事件啊
展开全部
是Form的MouseMove事件,对于托盘图标的按了什么键,则通过x来判断。
x/Screen.TwipsPerPixelX的结果即为按键消息,如下:
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_RBUTTONDBLCLK = &H206
直接在MouseMove事件中判断按了哪个键被点击,决定是否需要执行: Me.show显示窗口,或弹出菜单。
x/Screen.TwipsPerPixelX的结果即为按键消息,如下:
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_RBUTTONDBLCLK = &H206
直接在MouseMove事件中判断按了哪个键被点击,决定是否需要执行: Me.show显示窗口,或弹出菜单。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询