Главная » Статьи » Програмування » Visual Basic (vb) | [ Добавить статью ] |
Текст який крутиться
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Timer1.Interval = 1 Static angle As Long Dim rotation_matrix As New System.Drawing.Drawing2D.Matrix angle += TextBox1.Text rotation_matrix.RotateAt(angle, New PointF(70, 70)) Dim g = Me.CreateGraphics() g.Transform = rotation_matrix g.Clear(Color.Black) g.DrawString("DEN-SHP", Font, Brushes.Gold, New RectangleF(70, 70, 150, 150)) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Timer1.Stop() End Sub End Class
| |
Просмотров: 638 | |
Всего комментариев: 0 | |