I have been looking for different solutions and when I finally thought I had it, an "Unhandled Exception" appears. I am a student and I am just starting out and I wanted to see if you could offer me alternatives.
The problem is the following:
"Design a program that determines the amount to be paid and the preview gift for a customer of the shop.
In addition, when the form is executed, it must show a photo of a client, and then when you click
The photo must show a photo of another client up to 3 photos."
What I have tried:
This is the code that I have been doing but I keep getting "unhandled exception"
private void Form1_Load(object sender, EventArgs e)
{
picfoto.Image = Image.FromFile("Foto1.jpg");
a = 1;
}
private void picfoto_Click(object sender, EventArgs e)
{
switch (a)
{
case 1:
picfoto.Image = Image.FromFile(Application.StartupPath + "Foto2.png");
a = a + 1;
break;
case 2:
picfoto.Image = Image.FromFile(Application.StartupPath + "Foto3.png");
a = a + 1;
break;
case 3:
picfoto.Image = Image.FromFile(Application.StartupPath + "Foto4.png");
a = 1;
break;
}