Click here to Skip to main content
12,550,735 members (39,253 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET

i have a window application in

i need to add smilies or emotions in richtextbox with text (like yahoo chat).

suppose i have written: hi how are you -smile-
it will replace: hi how are you and (-smile- with image)

thanks in advance. please help me.
Posted 27-Mar-11 20:50pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This article [^]should suit your requirements.
kals84 28-Mar-11 3:34am
thanks for the solution but i need the code in not in c# as i don't know c#
Smithers-Jones 28-Mar-11 6:43am
Sigh. Google for "convert c# to".
SAKryukov 28-Mar-11 22:30pm
Yes, good matter, a 5.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hope this[^] might help you.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You can display a UIElement, such as an Image or a Button, in a RichTextBox.

This enables rich text scenarios, such as displaying content from a chat client and showing emoticons.

UI elements are active when the RichTextBox is in read-only mode and inactive in edit mode. For example, they can respond to input and receive focus only when they are in read-only mode. Use the InlineUIContainer tag to add content that is derived from UIElement.

The following shows how to add an image to a RichTextBox.
'A RichTextBox with an image.
                      Sub ImageRTB()
    'Create a new RichTextBox.Dim MyRTB AsNew RichTextBox()

    ' Create a Run of plain text and image.Dim myRun AsNew Run()
    myRun.Text = "Displaying text with inline image"Dim MyImage AsNew Image()
    MyImage.Source = New BitmapImage(New Uri("flower.jpg", UriKind.RelativeOrAbsolute))
    MyImage.Height = 50
    MyImage.Width = 50
    Dim MyUI AsNew InlineUIContainer()
    MyUI.Child = MyImage
    ' Create a paragraph and add the paragraph to the RichTextBox.Dim myParagraph AsNew Paragraph()
    ' Add the Run and image to it.
    'Add the RichTextBox to the StackPanel.
Extracted from:[^]

Hope this helps,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 10 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100