Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Thu Sep 22, 2005 4:20 am Post subject: HOWTO : Determine when the text or link of a shell popup notification window is clicked |
|
|
The ShellPopupNotification component does not have a direct event which enables the developer to determine when the text or link of a shell popup notification window is clicked. Instead, the OnMouseUp event must be used to achieve this as follows :
' OnMouseUp event handler
Private Sub ShellPopupNotification1_OnMouseUp(ByVal PopupWnd As ShellObjects.IShellPopup, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
' Call the HitTest method of the ShellPopup object
If PopupWnd.HitTest(X, Y) = SPAText Then
MsgBox "Text clicked" ' Text was clicked
End If
End Sub
Similarly, to determine whether the link was clicked, simply use SPALink enumeration member instead of SPAText as follows :
' Call the HitTest method of the ShellPopup object
If PopupWnd.HitTest(X, Y) = SPALink Then
MsgBox "Text clicked" ' Text was clicked
End If
This technique can also be used to determine whether the background image, logo image, background or the Office2003 gripper was clicked. |
|