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.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Thu Sep 22, 2005 4:32 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 MouseUp event must be used to achieve this as follows :

[C#]
' MouseUp event handler
private void shellPopupNotification1_MouseUp(object sender, LogicNP.ShellObjects.ShellPopupMouseEventArgs e)
{

' Call the HitTest method of ShellPopup
if(e.Popup.HitTest(e.X,e.Y)==ShellPopupAreas.Text)
MessageBox.Show("Text clicked");

}



[VB.Net]
' MouseUp event handler
Private Sub ShellPopupNotification1_MouseUp(ByVal sender As Object, ByVal e As LogicNP.ShellObjects.ShellPopupMouseEventArgs) Handles ShellPopupNotification1.MouseUp

' Call the HitTest method of ShellPopup
If e.Popup.HitTest(e.X, e.Y) = LogicNP.ShellObjects.ShellPopupAreas.Text Then
MessageBox.Show("Text Clicked")
End If

End Sub


Similarly, to determine whether the link was clicked, simply use Link enumeration member instead of Text as follows :

[C#]
' Call the HitTest method of ShellPopup
if(e.Popup.HitTest(e.X,e.Y)==ShellPopupAreas.Link)
MessageBox.Show("Text clicked");


[VB.Net]
' Call the HitTest method of ShellPopup
If e.Popup.HitTest(e.X, e.Y) = LogicNP.ShellObjects.ShellPopupAreas.Link Then
MessageBox.Show("Text 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.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group