473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Display Images in a Combobox

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

Jun 27 '07 #1
2 6785
Have a look at this:

http://www.codeproject.com/cs/miscct...BoxControl.asp

Cheers,
Johnny J.

"Randy" <sp***********@gmail.comwrote in message
news:11*********************@i38g2000prf.googlegro ups.com...
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

Jun 28 '07 #2
Thanks. I'll look into it.

Randy

Jun 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: google | last post by:
This is something I've done plenty of times in '97, but I can't seem to get it to work correctly in Access 2003. Say, for example, I have a form with an unbound combobox, the data source is a...
4
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
0
by: Richard | last post by:
I have a combobox that I use to display the advertising medium that attracted a client. On the Client's table is the foreign key AdvertisingMedium, and the combobox successfully reads the data...
2
by: AMDRIT | last post by:
Hello Everyone, I would like to format the Display Members of a combobox's datasource. Is there a way to apply a format without subclassing the original datasource? For example, given a list of...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
0
by: yalanue | last post by:
I want to create a combobox with its displaymember populated from a datatable. But once I get it run, the default display member in the combobox is always the first row of the displaymember list....
7
by: creative1 | last post by:
hi, I have a simple query. I have a dynamic combobox when I select one value fromt he combobox; on click a function is called that display the value of the combobox(i.e not same as text list of...
2
by: kurtzky | last post by:
i created a form that should function as follows: i will enter a number in a textbox..then it should query from the database all the records which has that number..these records will have a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.