C# - Insert Image Into RichTextBox

This snippet inserts an image into a RichTextBox control.
  1. Image img = Image.FromFile("image.jpg");  
  2. Clipboard.SetImage(img);  
  3.  
  4. richTextBox1.SelectionStart = 0;  
  5. richTextBox1.Paste();  
  6.  
  7. Clipboard.Clear()

No comments:

Post a Comment