|
-
Jul 5th, 2000, 05:39 AM
#1
Thread Starter
New Member
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.
-
Jul 5th, 2000, 07:40 AM
#2
Fanatic Member
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
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jul 5th, 2000, 08:15 AM
#3
_______
<?>
'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
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 7th, 2000, 12:59 AM
#4
Thread Starter
New Member
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.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|