Sky Software Homepage LogicNP Software Knowledge Base And FAQ

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

HOWTO: Use ShellNotifyIcon in WPF applications

 
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: Fri Feb 06, 2009 6:10 am    Post subject: HOWTO: Use ShellNotifyIcon in WPF applications

From the 'Shell MegaPack.Net WPF' toolbox tab, double-click on the 'ShellNotifyIcon' component to place it on your WPF form; then use the following code in the Window.Loaded event:
[C#]
Code:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
  shellNotifyIcon1.ImageList.Add(new Bitmap("C:\\image.bmp"));
  shellNotifyIcon1.HostWindow = this;
}


[VB.Net]
Code:
Private Sub Window1_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
 
  ShellNotifyIcon1.ImageList.Add(new Bitmap("C:\image.bmp"))
  ShellNotifyIcon1.HostWindow = Me

End Sub
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