How to insert Images in a RichTextBox...

UCM

Well-known member
Joined
Jan 1, 2003
Messages
135
Location
Colorado, usa
Does any one know how I can insert an images in between words in a RichTextBox?

I would like to read a string and when certain characters are found such as ( H ) then I can insert in their place an image...
 
What I am looking for on this subject is the ability to send text to a RichTextBox and then add an image like an Icon, BitMap, Jpeg, or Gif then add more text and more images, ect ect...

Think how AIM does it....
 
First, Im no expert on the RTB control. Knowing that, is it possible to add images to one?

It sounds like you want to just append some text and/or images to a rich text box. If so (check that you can first), Id suggest not replacing *every* occurrence of ( H ) with your own icon, but concentrate on the codes needed to get the image in there and just append the properly formatted string to the textbox. I havent played around with the RTB in a few years but I remember that to change existing text you had to first find it, set the selection properties (start and length?) and then adjust the selected text. If you can limit your scope to just appending, it may make things a lot easier.

-Nerseus
 
Back
Top