Bitmap bmp = new Bitmap(16, 16);
using (Graphics g = Graphics.FromImage(bmp))
Font drawFont = new Font("Arial", 16);
SolidBrush drawBrush = new SolidBrush(Color.Black);
string theNumber="8";
g.DrawString(theNumber,drawFont,drawBrush,new Point(100,100))
notifyIcon1.Icon = Icon.FromHandle(bmp.GetHicon());
see also :
Dynamically Generating Icons (safely)[
^]