srolling text in the form

If you have completed an application and wish to share the complete source/project files with everyone then please post it in here. Source-code files only, no tutorials.
6 posts Page 1 of 1
Contributors
User avatar
lillogoal
VIP - Donator
VIP - Donator
Posts: 15
Joined: Sun Feb 21, 2010 5:56 pm

srolling text in the form
lillogoal
This Is Source
Code: Select all
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim starting As String = "Websitelillo "

        Dim out As String = ""
        For i As Integer = 0 To starting.Length - 1
            out += starting(i) & vbLf
        Next

        Me.Text = out
        Timer1.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Timer1.Stop()
        Me.Text = Me.Text.Insert(Me.Text.Length, Me.Text.Substring(0, 2))

        Me.Text = Me.Text.Remove(0, 2)
        Timer1.Start()
    End Sub
End Class
Image
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: srolling text in the form
mandai
Just saying, this was posted earlier: viewtopic.php?f=21&t=2697#p17393
Last edited by mandai on Sun Jan 29, 2012 6:16 pm, edited 1 time in total.
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: srolling text in the form
zachman61
this is wrong section and mandai posted this not you
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
un kn0 wn
VIP - Donator
VIP - Donator
Posts: 269
Joined: Mon Mar 29, 2010 6:12 pm

Re: srolling text in the form
un kn0 wn
zachman61 wrote:
this is wrong section and mandai posted this not you
this is slightly different i fink, well anyways nice job but put this in the tutorials section.
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: srolling text in the form
Agust1337
its the same codes as Mandai posted.

lillogoal's:
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim starting As String = "Websitelillo "

Dim out As String = ""
For i As Integer = 0 To starting.Length - 1
out += starting(i) & vbLf
Next

Me.Text = out
Timer1.Start()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Stop()
Me.Text = Me.Text.Insert(Me.Text.Length, Me.Text.Substring(0, 2))

Me.Text = Me.Text.Remove(0, 2)
Timer1.Start()
End Sub
End Class
Mandai's:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim starting As String = "starting value "

Dim out As String = ""
For i As Integer = 0 To starting.Length - 1
out += starting(i) & vbLf
Next

Label1.Text = out
Timer1.Start()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Stop()
Label1.Text = Label1.Text.Insert(Label1.Text.Length, Label1.Text.Substring(0, 2))

Label1.Text = Label1.Text.Remove(0, 2)
Timer1.Start()
End Sub
the only difference is the Dim starting as string = "websitelillo" & "Starting value"
Top-notch casual Dating
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: srolling text in the form
mandai
Well also the fact that it changes Me.Text instead of label1.Text, but the process is still the same.
6 posts Page 1 of 1
Return to “Source-Code”