Print Special Character in VB6

I am using chr$(42) right now for printing a special character.  
How can i make it the smile-face character instead?
This needs to be added to a text string.
Example sub * with smiley-faces
Who is Participating?
kbireckiConnect With a Mentor Commented:
You have two choices, neither one is trivial.  

You could use a rich text box that would allow you to combine fonts.  And you could do some replacement of the special character(s) that you want to represent your smiley, basically like what you might see on a website that supports what you describe.  Check this site.  Your smiley could be the "picture" inserted by this example code.  (Or search for "vb6 rich text box smiley".)

If you want it embedded in text, you have to find a character set that includes the character you want to substitute, because that is the "only" font you can use in the text box.  Text boxes can only have one font assigned to them, so the character you want has to be in the assigned font.

To find a font you can use, if you choose start - run and type (or Start - and then type in Win 7),  "charmap", you'll get the Character Map Windows program that you allows you to sift through the list of fonts you have on your computer.  Important Note: your concept depends on the fonts that are currently installed on any computer that you expect to be able to use your app.  I've done this, and I found in some cases, you have to find a Unicode font set to get decent special characters *and* regular alphabetic/numeric characters and it has to be installed on your target system.  And just because you have the font, does not necessarily mean you can redistribute, so check into that as well.  Some fonts are licensed.  You may have to use Unicode functions when you do any replacements or reference to the characters, such as ChrW(10003) for character with ASCII value of 10003.  It's a little tricky, but it can be done.  But again, it relies on the font selected being installed on the target computer(s).  
Martin LissOlder than dirtCommented:
Is the smiley actually in the text?
GarySBAuthor Commented:
I want to print a sentence and substitute the smiley face for some letters.
GarySBAuthor Commented:
Thank You for the additional information
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.