Programalama > VISUAL BASIC

Etiketler: kendi, araba, oyununu, yapmak

Ort. 0
Puan ver:
Public Class Form2

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Start()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        PictureBox1.Left = 0
        PictureBox2.Left = 0
        Timer1.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim a, b As Integer
        Randomize()
        a = Rnd() * 30
        b = Rnd() * 30
        PictureBox1.Left += a
        PictureBox2.Left += b
        If PictureBox1.Left > 800 Or PictureBox2.Left > 800 Then
            Timer1.Stop()
            If Timer1.Enabled = False Then
                If PictureBox1.Left > PictureBox2.Left Then
                    Label1.Text += "Kazanan A Arabası"
                Else
                    Label1.Text += "Kazanan B Arabası"
                End If
            Else
                Button2.Enabled = False
            End If
        End If
    End Sub

    Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
        Timer1.Interval = HScrollBar1.Value + 1



    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Me.Close()
        

    End Sub

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub


Yorumlar                 Yorum Yaz
grkemz (0) Sakıncalı Yorum 12 March 19:50
açıklama yapar mısınız ne eklemelyim...
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.