Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Threading.Tasks
Imports System.Windows.Forms
' make sure that using System.Diagnostics; is included
Imports System.Diagnostics
' make sure that using System.Security.Principal; is included
Imports System.Security.Principal
Public Class Form1
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Private StartPos As Integer = 0
Private TextToShow As String = "Catch me if you can :)"
Private Position As Integer = 20
Private Sub timer1_Tick(sender As Object, e As EventArgs) Handles timer1.Tick
Me.Refresh()
Dim gra As Graphics = Me.CreateGraphics()
gra.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality
gra.DrawString(TextToShow, New Font("Arial", Position), New SolidBrush(Color.Black), StartPos, 35)
StartPos += 10
If StartPos >= Me.Width Then
StartPos = TextToShow.Length * Position * -1
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
End Class
No comments:
Post a Comment