I was searching the web for quite a while trying to find a way to convert an image to RTF format. There are plenty of articles that kill the clipboard, put the image there, and then paste it into the text box. Not very nice, I'd be a bit bitter if I lost my clipboard data! Seriously.

There was even an article on CodeProject about converting to EMF, then to WMF using some GDI declares!

I wonder why people didn't just think to store the clipboard data, then put it back?? Well anyway. Such a small amount of code, no PInvoke.

Private Sub insertImage(ByVal rtb As RichTextBox, ByVal image As Image)
  'store old data, so we can set it back afterwards.
  Dim oldData As IDataObject = Clipboard.GetDataObject
  Clipboard.SetDataObject(image)

  Dim format As DataFormats.Format = DataFormats.GetFormat(DataFormats.Bitmap)
  If rtb.CanPaste(format) Then
    rtb.Paste(format)
  End If

  'set old data back.
  Clipboard.SetDataObject(oldData)
End Sub