mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-17 01:35:40 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user