[RESOLVED] system tray menu
i used the standard subclassing to create a system tray icon and then used the following code for the event handling
VB Code:
Select Case uMsg
Case WM_MYHOOK
Select Case lParam
Case WM_RBUTTONUP
SetForegroundWindow (Main_Page.hwnd)
Main_Page.PopupMenu Main_Page.mnusystray
Case WM_LBUTTONDBLCLK
Main_Page.WindowState = vbNormal
Main_Page.Show
Case NIN_BALLOONSHOW
Case NIN_BALLOONHIDE
Case NIN_BALLOONUSERCLICK
Main_Page.WindowState = vbNormal
Main_Page.Show
Case NIN_BALLOONTIMEOUT
End Select
the problem is that on right clicking the sysicon the menu popsup but when i select a menu .the app freezes
VB Code:
Private Sub mnushowmain_Click()
Main_Page.WindowState = vbNormal
Main_Page.Show
End Sub
the above is to display the main form
and in my form_resize i have the following code
VB Code:
ShellTrayRemove
UnSubClass Main_Page.hwnd
Me.lblmsg.Caption = ""
Me.Show
interestingly the WM_LBUTTONDBLCLK event works fine,where could the problem lie?