Command Oyunu

'Programlama' forumunda ...... tarafından 7 Ağu 2009 tarihinde açılan konu

Konu etiketleri:
  1. ......

    ...... Misafir

    Forma 1 tane timer ve 1 tane command ekliyoruz.bu oyunda elinizin ne kadar çabuk olduğunu öğrenebilirsiniz.


    Kod:
    Private Sub Command1_Click(Index As Integer)
    Me.Command1(Index).Visible = False
    End Sub
    
    Private Sub Command1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then End
    End Sub
    
    Private Sub Timer1_Timer()
    Static K
    K = K + 1
    Load Me.Command1(K)
    Me.Command1(K).Left = Int(Rnd * (Me.ScaleWidth - Me.Command1(K).Width))
    Me.Command1(K).Top = Int(Rnd * (Me.ScaleHeight - Me.Command1(K).Height))
    Me.Command1(K).Visible = True
    If Me.Timer1.Interval > 50 Then
        If K Mod 10 = 0 Then Me.Timer1.Interval = Me.Timer1.Interval / 2
    End If
    End Sub
     

Bu Sayfayı Paylaş