by Gonzalo Besoain F. (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Thu 17th June 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Eliminates the system tray popup menu problem "popup menu doesn¡t dissapear when click outside it"
API Declarations
Lib "user32" (ByVal hwnd As Long) As Long
Result = SetForegroundWindow(Me.hwnd)
'the following is a code context example ,assuming that you already have your
'application icon on the system tray
Private Sub Picture1_MouseMove _
(Button As Integer, _
Shift As Integer, _
X As Single, Y As Single)
If Button = 2 Then
DoEvents
Result = SetForegroundWindow(Me.hwnd)
Me.PopupMenu Me.mnuShell 'mnuShell is the name of the menu to be popup'ed
End If
End Sub
No comments have been posted about Eliminates the system tray popup menu problem popup menu doesn¡t dissapear when click outside it. Why not be the first to post a comment about Eliminates the system tray popup menu problem popup menu doesn¡t dissapear when click outside it.