Visual Basic içinde Form üzerinde gelişi güzel hareket eden top konusu , Forma bir adet shape nesnesi ve bir adet timer eklemek yeterlidir.Shape nesnesinin shape özelliğini properties penceresinden 3-circle olarak değiştirerek bir top haline getirin… Dim sag, yuk As Boolean Private Sub ...
|
|
|||||||
| KAYIT OL | Yönetim Takımı | Üye Listesi | Tüm konuları okunmuş kabul et |
|
|
#1 (permalink) |
|
EN Afilli
![]() |
Forma bir adet shape nesnesi ve bir adet timer eklemek yeterlidir.Shape nesnesinin shape özelliğini properties penceresinden 3-circle olarak değiştirerek bir top haline getirin… Dim sag, yuk As Boolean Private Sub Form_Load() sag = False yuk = False Shape1.Left = 250 Shape1.Top = 250 Shape1.Width = 400 Shape1.Height = 400 Timer1.Interval = 12 End Sub Private Sub Timer1_Timer() If yuk = True Then Shape1.Top = Shape1.Top - 100 Else Shape1.Top = Shape1.Top + 250 End If If sag = True Then Shape1.Left = Shape1.Left - 100 Else Shape1.Left = Shape1.Left + 250 End If If Shape1.Left < 0 Then sag = False End If If Shape1.Left > Form1.Width - Shape1.Width Then sag = True End If If Shape1.Top < 0 Then yuk = False End If If Shape1.Top > Form1.Height - Shape1.Height Then yuk = True End If End Sub
__________________
Geri döndüm
|
|
|
|
![]() |
| Konu Yönetim Seçenekleri | |
| Konu Gösterim Seçenekleri | |
|
|