-
Ummmm......I NEED HELP.
How do i make it so that when you select a certain item that a picture shows up in a box on the same window or text shows up.
Ex.. You click on a selection and in the image/lable window in the corner of the screen a picture/text shows up.
-
Hi ~@lienKiller~
If I understand you correctly, fill the list box with the following code
mylistbox.ListItems.Add YourKey, strDescription
where YourKey is what you want to identitfy each record by.
Then use the onclick event to do the following
Code:
strKey = mylistboz.SelectedItem.Key
Select Case strKey
Case "1"
label1.caption = "Is"
Case "2"
label1.caption = "This"
Case "3"
label1.caption = "What"
Case "4"
label1.caption = "You"
Case "5"
label1.caption = "Want"
End Select
You can make the key anything you like and in the case statement you can adapt it to incorperate pictures for a picture box.
Hope this Helps
Ian
-
<?>
'you need to add an Image control called image1
'and a listbox called List1
'change the C:\pictures\tyler1.jpg to reflect
'your pictures and path
Private Sub Form_Load()
List1.AddItem "Tyler 1"
List1.AddItem "Tyler2"
End Sub
Private Sub List1_Click()
strLoadMe = List1.ListIndex + 1
Select Case strLoadMe
Case "1"
Set Image1.Picture = LoadPicture("C:\pictures\tyler1.jpg")
Case "2"
Set Image1.Picture = LoadPicture("C:\pictures\tyler2.jpg")
End Select
End Sub
-
Hmmmm......
THANX that helped out alot(well the last 1 did the first 1 was a little confusing and it kept saying there was an error but thanx anyway.....