Display Images in a Combobox

R

Randy

Hi,

I have a small table - 2 columns, 5 rows. Col 1 is the key column and
has integer values of 1 through 5. Column 2 is a varbinary(MAX)
column and has jpg images loaded in it. What I want to is to bind a
combobox to this table so that the combobox will display these these
five images in its dropdown list and the user can then select any of
them. Depending on which image is selected, the combobox will display
the image and I will capture the integer value. Something like this:

Dim vueImages As New DataView
vueImages.Table = ds.Images
cboImages.DataSource = vueImages
cboImages.ValueMember = "int"
cboImages.DisplayMember = "Images"

My questions are:

1. Can the combobox control be used to display images? If not, can
anybody suggest a good way to accomplish this?
2. In my Images table, I have imported the jpg files using a SQL
query. I cannot see these images in the table as all that the table
will display is "<binary data>" in the Images column. I chose this
data type based on some advice that I received in the SQL group. If
anybody sees a reason that this won't work, please let me know.

Thank you,
Randy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top