Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO : Determine when the text or link of a shell popup notification window is clicked

 
Subscribe to the RSS feed for this forum  Forum Index -> ShellObjects ActiveX
View previous topic :: View next topic  
Author Message
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.
Back to top
Display posts from previous:   
Forum Index -> ShellObjects ActiveX All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group