Welcome to Dream.In.Code
Become a VB Expert!

Join 149,478 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,696 people online right now. Registration is fast and FREE... Join Now!




Picture Box

 
Reply to this topicStart new topic

Picture Box, multiple images in a picture box

Reino66
7 May, 2007 - 12:35 PM
Post #1

New D.I.C Head
*

Joined: 7 May, 2007
Posts: 1


My Contributions
I am writing a program that displays the results of a show, based on user input. In the end, when the results are displayed a picture of a "ribbon" is also displayed (like blue ribbon for first). My problem is some of the entrants are in multiple events but I can't seem to figure out how to put more than one image in a picture box. Here is the code section I am having the problem with. It does all correct except if an entrant is is two events, it list both results in the listbox, but only displays the last image ... thanks
CODE

For index As Integer = 1 To 50
            If rider(index).ridernum = TxtRidNum.Text Then
                ListBox1.Items.Add(rider(index).name & ", you entered class " & rider(index).eventclass)
                For x As Integer = 1 To 50
                    If result(x).eventclass1 = rider(index).eventclass Then
                        ' ListBox1.Items.Add("In class " & result(index).eventclass1)
                        ridernumber = TxtRidNum.Text
                        If ridernumber = result(x).first Then
                            ListBox1.Items.Add("Congratulations, you placed FIRST in the class!")
                            Picboxout.Image = Image.FromFile("fplace.jpg")
                            Exit For
                        ElseIf ridernumber = result(x).second Then
                            ListBox1.Items.Add("Congratulations, you placed SECOND in the class!")
                            Picboxout.Image = Image.FromFile("splace.jpg")
                        ElseIf ridernumber = result(x).third Then
                            ListBox1.Items.Add("Congratulations, you placed THIRD in the class!")
                            Picboxout.Image = Image.FromFile("tplace.jpg")
                        Else : ListBox1.Items.Add("Sorry but you did not place in the ribbons.")
                        End If
                    End If
                Next
            End If

User is offlineProfile CardPM
+Quote Post

melonchollie540
RE: Picture Box
7 May, 2007 - 04:37 PM
Post #2

New D.I.C Head
*

Joined: 6 Feb, 2007
Posts: 29


My Contributions
Create a picture outside of VB that has multiple ribbons and you can add code that based on the amount of events won, a certain number of ribbons will show up.
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Picture Box
7 May, 2007 - 11:19 PM
Post #3

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,026



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
Exactly what I was thinking.
melonchollie540 has a good idea.

Infact the same method is used in Cell Phone Games. (Well, at least for the Java Games)
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 03:27PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month