public void InsertImage(Image image, int position) { GifBox control = new GifBox(); control.BackColor = base.BackColor; control.Image = image; this.RichEditOle.InsertControl(control, position, 0); }
public void InsertImage(uint imageID, int position) { if (imageID <= 0) { throw new Exception("imageID must greater than 0."); } GifBox control = new GifBox(); control.BackColor = base.BackColor; control.Image = Image.FromFile(this.imagePathGetter.GetPath(imageID)); this.RichEditOle.InsertControl(control, position, imageID); }