
If you've searched the Internet for an easy way to insert images into a RichTextBox, chances are you've come across variations of the following solution which copies the image to the clipboard, pastes it in the target RichTextBox, and clears the contents of the clipboard. This is not a good solution because it alters the clipboard without informing the user, which can be a real inconvenience. Other solutions hard-code thousands of lines of the HEX representation of images into the program, but that's not very flexible (or practical). There is also no standard way of inserting plain text into a RichTextBox at runtime.
|