Public Class Form2
Dim pravilno As Long = 0
Dim neprav As Long = 0
Dim Vibor As Long
Dim ostrov As Bitmap = Image.FromFile(Application.StartupPath & "\image\ostrov.jpg")
Dim dub As Bitmap = Image.FromFile(Application.StartupPath & "\image\dub.jpg")
Dim sunduk As Bitmap = Image.FromFile(Application.StartupPath & "\image\sunduk.jpg")
Dim zayc As Bitmap = Image.FromFile(Application.StartupPath & "\image\zayc.jpg")
Dim duck As Bitmap = Image.FromFile(Application.StartupPath & "\image\duck.jpg")
Dim e As Bitmap = Image.FromFile(Application.StartupPath & "\image\e.jpg")
Dim igla As Bitmap = Image.FromFile(Application.StartupPath & "\image\igla.jpg")
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
PictureBox1.BackgroundImage = My.Resources.Рисунок2
PictureBox2.BackgroundImage = ostrov
PictureBox3.BackgroundImage = ostrov
PictureBox4.BackgroundImage = ostrov
Label1.Text = "остров"
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click, PictureBox3.Click, PictureBox4.Click
Randomize()
Vibor = Fix(2 * Rnd())
If Vibor = 0 Then neprav = neprav + 1
If Vibor = 1 Then pravilno = pravilno + 1
If Label1.Text = "остров" Then
PictureBox1.BackgroundImage = My.Resources.Рисунок3
PictureBox2.BackgroundImage = dub
PictureBox3.BackgroundImage = dub
PictureBox4.BackgroundImage = dub
Label1.Text = "дуб"
End If
If Label1.Text = "дуб" Then
PictureBox1.BackgroundImage = My.Resources.Рисунок4
PictureBox2.BackgroundImage = sunduk
PictureBox3.BackgroundImage = sunduk
PictureBox4.BackgroundImage = sunduk
Label1.Text = "сундук"
End If
End Sub
End Class