Adding images to a textbox?

Posted on 2003-03-09
Medium Priority
Last Modified: 2010-04-07
Hi there,

Got a 'quick' question... Can I add an image to a textbox? Or can I make it look like an image is in the textbox?

Thanks in advance!
Question by:Siebe
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 8099469
No you can't add an image to a textbox

Use an image control and use the winapi to set the left margin of the textbox to accomadate the image.You would have to use the winapi to adjust the margins of the textbox to accomadate the image and either paint the image using BitBlt or use an image control.

Author Comment

ID: 8099630
And what about the richtext format textboxes?
LVL 18

Accepted Solution

Sethi earned 300 total points
ID: 8100042
You can add image to a Richtextbox control. The following links provide excellent code to show how picture can be added to Richtextbox control:



Author Comment

ID: 8101618
Thanks! Just what I needed, with a little tweeking tough
LVL 18

Expert Comment

ID: 8107641

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question