Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,

I've got a huge problem with my code, while developing I just tested the program on Windows 7 and 10 systems.
Now the customer wants it to be used also on Windows XP machines, basically its written for .Net3.5, to be compatible with most systems.
On my Windows XP physical testmachine, I've got net 3.5 installed but my "taskbarnotifyicon", I'm using the popular library from hardcodet.net (V1.0.4.0 for .net 3.5), the icon is not visible. There is just a blank space, where it should be but no icon is displayed, even no mouseover-text and contextmenu is not available.
I debugged the program so far, that the problem is based on the icon.

C#
Info Infofenster = new Info();
ContextMenu conMen = new ContextMenu();
MenuItem Info = new MenuItem();
public App()
{
   //other source, blabla
}
protected override void OnStartup(StartupEventArgs e)
{
        base.OnStartup(e);
        //some code, Database etc.
        Info.Click += OpenInfo;
        Info.Header = "Info";
        conMen.Items.Add(Info);
        icon = new TaskbarIcon();
        icon.Icon = AmpelStempelzeit.Properties.Resources.ledAnwesend;
        icon.ToolTipText = "Eingestempelt";
        icon.Visibility = Visibility.Visible;
        icon.TrayPopup = new Popup(icon);
        icon.ContextMenu = conMen;
}
protected override void OnExit(ExitEventArgs e)
{
        icon.Dispose();
        base.OnExit(e);
}


Running on Windows 7, 8, 10 works great, probably WinXp cant handle the "Resourcepath" for images?
I really have no idea.

Regards from snowy Germany,
Vince
Posted
Comments
Richard Deeming 20-Jan-16 9:46am    
Is your resource a .ico file? If so, check that it only contains formats supported by XP. In particular, 256x256 icons are not supported.
Haechtsuppe 21-Jan-16 3:48am    
oh yeah, that was a great idea. Worked with 300*300, scaled to 150*150 and now it works really good.
Thank you

1 solution

Scaled it to 150*150 and now it works like a charm.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900