@Jack J Jun @Castorix31 @Rool0507
Now I put the code under the switch, and I merged these two buttons into one event and still have
I still have a problem with the button, when I press the left arrow the first time, it looks like I clicked the right button, but I didn't, and the second time I press the left click, then it's fine, but that's how it goes. So I just have one more problem left, you can see it better in the video.
private void nxt_KeyUp(object sender, KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.Left:
try
{
next--;
slike.Image = listaSlika.Images[next];
}
catch (Exception ex)
{
MessageBox.Show("Ne mozes nazad!");
}
if (next < 0)
{
next = -1;
}
break;
case Keys.Right:
try
{
next++;
slike.Image = listaSlika.Images[next];
}
catch (Exception ex)
{
MessageBox.Show("Nema vise opcija za naprijed!");
}
if (next > 3)
{
next = 3;
}
break;
}
}