h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Display Form Icon in the Menu Strip of MDI Form

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();