Today we will discuss about Display Form Icon in the Menu Strip of MDI Form
childform.MdiParent = this; childform.WindowState = FormWindowState.Maximized; childform.BringToFront();
var bmp = new Bitmap(16, 16);
using (var g = Graphics.FromImage(bmp))
{
g.DrawImage(childform.Icon.ToBitmap(), new Rectangle(0, 0, 16, 16));
}
var newIcon = Icon.FromHandle(bmp.GetHicon());
childform.Icon = newIcon; childform.Show();
var bmp = new Bitmap(16, 16);
using (var g = Graphics.FromImage(bmp))
{
g.DrawImage(childform.Icon.ToBitmap(), new Rectangle(0, 0, 16, 16));
}
var newIcon = Icon.FromHandle(bmp.GetHicon());
childform.Icon = newIcon; childform.Show();