private void ShieldBitmap(object sender, PaintEventArgs e) { if (!Windows7Security.IsVistaOrHigher()) { return; } // Construct an Icon. Icon icon1 = new Icon(SystemIcons.Shield, 16, 16); // Call ToBitmap to convert it. Bitmap bmp = icon1.ToBitmap(); // Draw the bitmap. e.Graphics.DrawImage(bmp, new Point(5, 3)); }
private void CodeSmithExtensionToolStripMenuItemClick(object sender, EventArgs e) { Windows7Security.StartCodeSmithHandler(); }