using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Drawing.Design; using System.Data; using System.Reflection; using System.Windows.Forms; using OakLeaf.MM.Main.Builders; using OakLeaf.MM.Main.Business; using OakLeaf.MM.Main.Globalization; using OakLeaf.MM.Main.Windows.Forms; namespace MyApp.Windows.Forms.Controls { /// <summary> /// myNavigationToolStrip /// </summary> public partial class myNavigationToolStrip : mmNavigationToolStrip { public mmToolStripButtonSave btnSave; /// <summary> /// Constructor /// </summary> public myNavigationToolStrip() { InitializeComponent(); btnSave = new mmToolStripButtonSave(); // code to load image in project as Embedded Resource // +++ make into function string bmpName = "MyApp.Windows.Forms.Resources.save.bmp"; System.IO.Stream strm = null; try { strm = this.GetType().Assembly.GetManifestResourceStream(bmpName); btnSave.Image = new Bitmap(strm); } catch (Exception e) { MessageBox.Show(e.Message); } finally { if (strm != null) strm.Close(); } this.SuspendLayout(); this.Items.Add(btnSave); this.ResumeLayout(false); } } }