1 / 9

Лабиринт

Лабиринт. Создаем интерфейс. Форма 2 для «Игра окончена». Создать форм2 для GAME OVER. Форма 3 для поздравления. Создать форм3 для поздравления победителя. Подсчет жизней. Двойной щелчок по форме В разделе Public объявляем переменную с количеством жизней: Public Class Form1

hayley
Download Presentation

Лабиринт

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Лабиринт

  2. Создаем интерфейс

  3. Форма2для «Игра окончена» • Создать форм2 для GAME OVER

  4. Форма3для поздравления • Создать форм3 для поздравления победителя

  5. Подсчет жизней • Двойной щелчок по форме • В разделе Public объявляем переменную с количеством жизней: Public Class Form1 Dim A As Integer

  6. Задаем количество жизней • Двойной щелчок по форме, пишем процедуру для события Form1_Load • Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load • A = 3

  7. Программирование разрушения робота (подсчета жизней) • Выбираем событие для label1 – MouseEnter(наведение мыши) • Private Sub Label1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseEnter • A = A - 1 • MsgBox(A, , "осталась жизней") • beep() • If A = 0 Then • Form3.Show() • Me.Hide()  • End If • End Sub

  8. Для всех остальных лейблов то же самое

  9. Код для финиша • Private Sub Label3_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label3.MouseEnter • Form2.Show() • Me.Hide() • End Sub

More Related