Actually, I want something like skype does. if someone send two messages on skype; you see number "2" on minimized skype window. So, I want to know how can I show number/counts on minimized window of your c# application?
If you are using WPF, you can use the TaskbarButtonInfo.Overlay property.
// draw an image to overlay
var dg = new DrawingGroup();
var dc = dg.Open();
dc.DrawEllipse(Brushes.Blue, new Pen(Brushes.LightBlue, 1), new Point(8, 8), 8, 8);
dc.DrawText(new FormattedText("3", System.Threading.Thread.CurrentThread.CurrentUICulture, System.Windows.FlowDirection.LeftToRight,
new Typeface("Arial"), 16, Brushes.White), new Point(4, 0));
dc.Close();
var geometryImage = new DrawingImage(dg);
geometryImage.Freeze();
// set on this window
var tbi = new TaskbarItemInfo();
tbi.Overlay = geometryImage;
this.TaskbarItemInfo = tbi;
Produces
If you are using Windows Forms, use Windows API Code Pack as documented in this related question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With