Public Class Form1
Dim a As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
a = a + 1
Select Case a
Case 1
Button1.TextAlign = ContentAlignment.MiddleCenter
Case 2
Button1.TextAlign = ContentAlignment.MiddleRight
Case 3
Button1.TextAlign = ContentAlignment.BottomRight
Case 4
Button1.TextAlign = ContentAlignment.BottomCenter
Case 5
Button1.TextAlign = ContentAlignment.BottomLeft
Case 6
Button1.TextAlign = ContentAlignment.MiddleLeft
Case 7
Button1.TextAlign = ContentAlignment.TopLeft
Case 8
Button1.TextAlign = ContentAlignment.TopCenter
Case 9
Button1.TextAlign = ContentAlignment.TopRight
Case 10
Button1.TextAlign = ContentAlignment.TopRight
a = 0
End Select
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
a = 0
Timer1.Interval = 1000
Timer1.Start()
End Sub
End Class
Hiç yorum yok:
Yorum Gönder