C# (CSharp) CentralServerDemo ExRichTextBox.InsertImage - 1 examples found. These are the top rated real world C# (CSharp) examples of CentralServerDemo.ExRichTextBox.InsertImage extracted from open source projects. You can rate examples to help us improve the quality of examples.
Inserts an image into the RichTextBox. The image is wrapped in a Windows Format Metafile, because although Microsoft discourages the use of a WMF, the RichTextBox (and even MS Word), wraps an image in a WMF before inserting the image into a document. The WMF is attached in HEX format (a string of HEX numbers). The RTF Specification v1.6 says that you should be able to insert bitmaps, .jpegs, .gifs, .pngs, and Enhanced Metafiles (.emf) directly into an RTF document without the WMF wrapper. This works fine with MS Word, however, when you don't wrap images in a WMF, WordPad and RichTextBoxes simply ignore them. Both use the riched20.dll or msfted.dll.
NOTE: The image is inserted wherever the caret is at the time of the call, and if any text is selected, that text is replaced.