Text Animation

xxn5

Member
Joined
Oct 23, 2013
Messages
8
Programming Experience
1-3
how to Title Bar Text Animation In VB.NET
in diff direction.
 
The simplest option there is to use a a Timer and handle its Tick event, changing the Text of the form in the event handler. By changing the number of spaces before the text each time, you can make the text move in either direction.
 
The simplest option there is to use a a Timer and handle its Tick event, changing the Text of the form in the event handler. By changing the number of spaces before the text each time, you can make the text move in either direction.

could you post an example.
 
Under the Timer_Tick event handler:
VB.NET:
Me.Title = String.Format(" {0}", Me.Title)

This would add a space to the front every time the Timer_Tick event handler hit. Set the Interval to whatever you want for the desired effect.

You could even do this if you wanted it to start over again.
VB.NET:
Const HardCodedTitle As String = "Program Name"
If Me.Title.Length >= HardCodedTitle.Length + 40 '40 spaces long, not including the original title
  Me.Title = HardCodedTitle
Else
  Me.Title = String.Format(" {0}", Me.Title)
End If
 
Back
Top