Inserting Pictures In A Textbox

Tyecom

Well-known member
Joined
Aug 8, 2007
Messages
78
Programming Experience
Beginner
I have a form with a TextBox1, ComboBox1, Button1, and PictureBox1. I have a folder (C:\Images) that contained images numbered from 1 to 500. I created a DataSet that populates the Combox and TextBox. My problem: When Textbox is populated with a number, that number corresponds with a image in C:\Images. That image should populate Picturbox1.

For example: The ComboBox list the names of Movies, the Textbox holds the MovieID number. When the button is clicked, the image associated to the number in TextBox1 is loaded in PictureBox1. Any help would be appreciated.
 
Sorry...here is the code:

Private Sub SearchComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchComboBox.SelectedIndexChanged

Dim Position As Integer = 0

If movieID.Text = "" Then
MsgBox("Please enter a valid Number")
End If

PictureBox1.Image = AddImage("C:\Images", movieID.Text)

'SearchComboBox.Refresh()


End Sub
 
Back
Top