0

I'm making a quiz and I wanna make it so everytime i click the Submit button it loads the next questions' respective picture from a file directory on my pc.

So first of all the questions are sorted randomly: 7 3 5 8 4... and stored into an array with 15 slots. So in this case it would be array(0) = 7, array(1) = 3 , 7 and 3 meaning question number 7 and question number 3 on the first and second slots. These are what my picture files look like: https://gyazo.com/5feaeb785c34acc3c04efbf53ea64973 I want to load one picture at a time into the picture box for each question like so:

For i=0 to i=14 "Load image(array(i)).png to picturebox" // so for instance when i=0 if the question on the first slot of the array is number 7, it loads image(7).png from my directory "next when submit button is clicked again"

How can i code this?

Using visual basic 2010 express btw

João
  • 1
  • 2
    Specific problem please? SO is not a free coding service. / Too broad. – user202729 Jan 28 '18 at 16:15
  • What is SO? My problem is how to code a loading procedure to do the following when i click the button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For i=0 to 14 "Picturebox's image = "C:\users\me\desktop\project\image(array(i)).png" , i adds up on the next button click " let's say array(0)=7 , then on the first click (i=0 on the for loop), the image loaded is "C:\users\me\desktop\project\image(7).png" End Sub How can I do this? – João Jan 28 '18 at 17:32
  • SO = **S**tack**O**verflow. Please place your code into the question, it's unreadable like that in the comments. – ADyson Jan 28 '18 at 21:13
  • you could start "reading" here maybe....https://msdn.microsoft.com/en-us/library/4sahykhd(v=vs.110).aspx – Chillzy Jan 28 '18 at 22:26

0 Answers0