Display image in picturebox after the other
Page 1 of 113 Replies - 1251 Views - Last Post: 15 November 2012 - 11:23 PM
#1
Display image in picturebox after the other
Posted 09 November 2012 - 06:23 AM
Image = A, B, C, D
click: [A] [ ] [ ] [ ]
click: [A] [B] [ ] [ ]
click: [A] [B] [C] [ ]
click: [A] [B] [C] [D] after displaying four images, pictureboxes will be set to nothing and start over again...
click: [A] [ ] [ ] [ ]
click: [A] [B] [ ] [ ]
click: [A] [B] [C] [ ]
click: [A] [B] [C] [D] and so on...
I don't know how to code this, someone please help.
I have already the code of capturing images from youtube. Thanks.
Replies To: Display image in picturebox after the other
#2
Re: Display image in picturebox after the other
Posted 09 November 2012 - 07:17 AM
royalopez06, on 09 November 2012 - 06:23 AM, said:
Find the piece of code that does it for picturebox1 and adapt it to the other pictureboxes.
Something like
picturebox1.Image = [whatever]
#3
Re: Display image in picturebox after the other
Posted 10 November 2012 - 06:47 AM
select case x
case 0
picturebox1.image = jpeg
case 1
picturebox2.image = jpeg
case 2
picturebox3.image = jpeg
case 3
picturebox4.image = jpeg
end case
it will display the same image in the picturebox 1 to 4 all at the same time.
#4
Re: Display image in picturebox after the other
Posted 10 November 2012 - 08:41 AM
If (PictureBox1.Image Is Nothing) Then PictureBox1.Image = jpeg ElseIf (PictureBox2.Image Is Nothing) Then PictureBox2.Image = jpeg 'and so on
#5
Re: Display image in picturebox after the other
Posted 12 November 2012 - 01:00 AM
#6
Re: Display image in picturebox after the other
Posted 12 November 2012 - 05:23 AM
If (PictureBox1.Image Is Nothing) Then
PictureBox1.Image = jpeg
ElseIf (PictureBox2.Image Is Nothing) Then
PictureBox2.Image = jpeg
ElseIf (PictureBox3.Image Is Nothing) Then
PictureBox3.Image = jpeg
ElseIf (PictureBox4.Image Is Nothing) Then
PictureBox4.Image = jpeg
else
PictureBox1.Image = Nothing
PictureBox2.Image = Nothing
PictureBox3.Image = Nothing
PictureBox4.Image = Nothing
End if
#7
Re: Display image in picturebox after the other
Posted 12 November 2012 - 07:55 AM
If (PictureBox1.Image IsNot Nothing AndAlso PictureBox2.Image IsNot Nothing AndAlso PictureBox3.Image IsNot Nothing AndAlso PictureBox4.Image IsNot Nothing) Then
PictureBox1.Image = Nothing
PictureBox2.Image = Nothing
PictureBox3.Image = Nothing
PictureBox4.Image = Nothing
End If
If (PictureBox1.Image Is Nothing) Then
PictureBox1.Image = jpg
ElseIf (PictureBox2.Image Is Nothing) Then
PictureBox2.Image = jpg
ElseIf (PictureBox3.Image Is Nothing) Then
PictureBox3.Image = jpg
ElseIf (PictureBox4.Image Is Nothing) Then
PictureBox4.Image = jpg
End If
And no need to use Else section of IF statement.
This post has been edited by zeeshanef: 12 November 2012 - 08:03 AM
#8
Re: Display image in picturebox after the other
Posted 12 November 2012 - 05:25 PM
#9
Re: Display image in picturebox after the other
Posted 14 November 2012 - 05:55 AM
#10
Re: Display image in picturebox after the other
Posted 14 November 2012 - 07:53 AM
#11
Re: Display image in picturebox after the other
Posted 15 November 2012 - 05:04 AM
#12
Re: Display image in picturebox after the other
Posted 15 November 2012 - 05:23 AM
Dim MyFrame(3) As PictureBox
MyFrame(0) = PictureBox1
MyFrame(1) = PictureBox2
MyFrame(2) = PictureBox3
MyFrame(3) = PictureBox4
If (PictureBox1.Image IsNot Nothing AndAlso PictureBox2.Image IsNot Nothing AndAlso PictureBox3.Image IsNot Nothing AndAlso PictureBox4.Image IsNot Nothing) Then
PictureBox1.Image = Nothing
PictureBox2.Image = Nothing
PictureBox3.Image = Nothing
PictureBox4.Image = Nothing
End If
for i = 0 to MyFrame.length - 1
If (MyFrame(i).Image Is Nothing) Then
MyFrame(i).Image = jpeg
ElseIf (MyFrame(i).Image Is Nothing) Then
MyFrame(i).Image = jpeg
ElseIf (MyFrame(i).Image Is Nothing) Then
MyFrame(i).Image = jpeg
ElseIf (MyFrame(i).Image Is Nothing) Then
MyFrame(i).Image = jpeg
End if
Next
Please help me with my code.
#13
Re: Display image in picturebox after the other
Posted 15 November 2012 - 05:30 AM
Learn how to debug, how to understand error messages, and stop posting "please help" type of vague requests/questions. Come with concrete problem, and you'll get tons of help.
#14
Re: Display image in picturebox after the other
Posted 15 November 2012 - 11:23 PM
If (PictureBox1.Image IsNot Nothing AndAlso PictureBox2.Image IsNot Nothing AndAlso PictureBox3.Image IsNot Nothing AndAlso PictureBox4.Image IsNot Nothing) Then Exit sub Else CounterForm.show() Then
|
|

New Topic/Question
Reply



MultiQuote





|