Hey guys,

I am using this program that I downloaded from this forum. What I need it to do though is when the system tray icon is clicked it will Hide the form and when it is double clicked it will show the popup menu.

Here is the code that brings up the popup menu.

VB Code:
  1. Private Sub picIcon_MouseUp(index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  2.     ' Messages from the systray will be passed here.    On Error GoTo BadMenu
  3.     Dim Msg As Long
  4.    
  5.     Msg = x / Screen.TwipsPerPixelX
  6.     Select Case Msg
  7.         Case WM_LBUTTONUP, WM_LBUTTONDBLCLK, WM_RBUTTONUP
  8.             PopupMenu mnuPopup
  9.     End Select
  10. End Sub

How can I make this work?

Thank you everyone!
Stilekid007