This is the code in my form to make the form visible again once the system tray icon is double clicked... but it doesn't even fire when I put the mouse over the systray icon.. When I added the systray icon. i set NOTIFYICONDATA valiable .hWnd property = frmMain.hWnd which I assume is how it binds the icon in the tray to the form.
Code:Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'Event occurs when the mouse pointer is within the rectangular 'boundaries of the icon in the taskbar status area. Dim Msg As Long Dim sFilter As String Msg = X / Screen.TwipsPerPixelX Select Case Msg Case WM_RBUTTONDOWN Case WM_RBUTTONUP Case WM_LBUTTONDBLCLK Me.Visible = True Me.WindowState = vbNormal Case Else 'DO NOTHING End Select End Sub




Reply With Quote