NotifyIcon WPF

--------------
ADD   Added custom balloon support.
CHG   Refactoring of names - properties and events are prefixed by "Tray" rather than "TaskbarIcon".

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@57 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
Philipp Sumi
2009-04-01 14:59:44 +00:00
parent 1242596214
commit fc7fa38ef5
14 changed files with 841 additions and 696 deletions

View File

@@ -126,7 +126,20 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
{
var data = new NotifyIconData();
data.cbSize = (uint) Marshal.SizeOf(data);
if (Environment.OSVersion.Version.Major >= 6)
{
//use the current size
data.cbSize = (uint)Marshal.SizeOf(data);
}
else
{
//we need to set another size on xp/2003- otherwise certain
//features (e.g. balloon tooltips) don't work.
data.cbSize = 504;
//set to fixed timeout
data.VersionOrTimeout = 10;
}
data.WindowHandle = handle;
data.TaskbarIconId = 0x0;