Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
1.89/5 (4 votes)
How to do this in C #. I need to show pictures under the pictures I write what constitutes an image if answered correctly the program go to the next picture if is not corectli display error or non corect?
Posted
Comments
ZurdoDev 12-Dec-13 8:06am    
Where are you stuck? Image1.Visible=true;

1 solution

Hi Gruden,

If you have 3 pictures in the picture box and you gonna validate each and every picture box then
C#
PictureBox1 = Image1;
PictureBox2 = Image2;
PictureBox3 = Image3;

At page load, show first picture that is
C#
PictureBox1.Visible = True;
PictureBox2.Visible = False;
PictureBox3.Visible = False;

At button click when user answers correct then
C#
PictureBox1.Visible = False;
PictureBox2.Visible = True;
PictureBox3.Visible = False;

Similarly for 3rd picture box.
C#
PictureBox1.Visible = False;
PictureBox2.Visible = False;
PictureBox3.Visible = True;

If user enters wrongly then
C#
PictureBox1.Visible = False;
PictureBox2.Visible = False;
PictureBox3.Visible = False;
MessageBox.Show("Wrong answer");

Hope this helps you a bit.

Regards,
RK
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900