HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
Size belirttiğim gibi bir zıplayan top yapımını öğreteceğim.
Öncelikle forma neler koymalıyız hemen söyleyelim:
3 adet optionbutton
1 adet checkbox
1 adet shape
1 adet timer
Hemen kodları vereyim:
Öncelikle forma neler koymalıyız hemen söyleyelim:
3 adet optionbutton
1 adet checkbox
1 adet shape
1 adet timer
Hemen kodları vereyim:
Kod:
Private Sub Check1_click() If Check1.Value = 1 Then Timer1.Enabled = False Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Else Timer1.Enabled = True Option1.Enabled = True Option2.Enabled = True Option3.Enabled = True End If End Sub Private Sub Option1_Click() Timer1.Interval = "20" End Sub Private Sub Option2_Click() Timer1.Interval = "12" End Sub Private Sub Option3_Click() Timer1.Interval = "1" End Sub Private Sub Timer1_Timer() Static ax, ay If IsEmpty(ax) Then ax = 100 ay = 100 End If If Shape1.Top <= 0 Or Shape1.Top >= Form1.ScaleHeight - Shape1.Height Then ay = -ay Beep End If If Shape1.Left <= 0 Or Shape1.Left >= Form1.ScaleWidth - Shape1.Width Then ax = -ax Beep End If Shape1.Left = Shape1.Left + ax Shape1.Top = Shape1.Top + ay End Sub
