Put label on form1, put timer on form1.
timer 1 enabled, interval 100.
go into timer1 code.
put in:
Put that shit under Private Sub Timer1_TickCode:Label1.Left -= 5 If Label1.Left <= -Width Then Label1.Left = Width End If End Sub End Class
How would i make text that scrolls across the application like, the label starts at one side of the program, slowly moves over towards the other side then once its out of sight on the other side it moves back to where it originally was and slowly moves across the application again, how would i do this
I looked all over google but i cant seem to find it
Put label on form1, put timer on form1.
timer 1 enabled, interval 100.
go into timer1 code.
put in:
Put that shit under Private Sub Timer1_TickCode:Label1.Left -= 5 If Label1.Left <= -Width Then Label1.Left = Width End If End Sub End Class
troll says: FUK YO COUCH NIGGA!
V[img]https://www.******************/forums/images/smilies/troll_run.gif[/img]
My goals list:
Legend:
Complete - Incomplete -
30 Posts: [] | 50 Posts: []
70 Posts: [] | 100 Posts: []
500 Posts: [] | 1,000 Posts: []
Release a CA NA pub: [] | Release a CFNA Pub: []
Pro C++ Coder: [] | Pro VB Coder: []
[IMG]https://images.encyclopediadramatic*****m/images/5/57/Pedobear_a.gif[/IMG]
Don't forget:
flameswor10 (12-30-2010)
Code:Do Until Label1.location.X = 100 'or whatever Label1.Location = New Point(Label1.Location.X - 2, Label1.location.y) System.Threading.Thread.Sleep(100) Loop
Last edited by Lolland; 12-30-2010 at 09:05 PM.
Bombsaway707 (01-07-2011),flameswor10 (12-30-2010)
My way works exactly the same, its smoother and its a million times easier lol
troll says: FUK YO COUCH NIGGA!
V[img]https://www.******************/forums/images/smilies/troll_run.gif[/img]
My goals list:
Legend:
Complete - Incomplete -
30 Posts: [] | 50 Posts: []
70 Posts: [] | 100 Posts: []
500 Posts: [] | 1,000 Posts: []
Release a CA NA pub: [] | Release a CFNA Pub: []
Pro C++ Coder: [] | Pro VB Coder: []
[IMG]https://images.encyclopediadramatic*****m/images/5/57/Pedobear_a.gif[/IMG]
Don't forget:
Mine should run smoother now.
Erm mmkay idc just posting to help. Whichever he decides is best
troll says: FUK YO COUCH NIGGA!
V[img]https://www.******************/forums/images/smilies/troll_run.gif[/img]
My goals list:
Legend:
Complete - Incomplete -
30 Posts: [] | 50 Posts: []
70 Posts: [] | 100 Posts: []
500 Posts: [] | 1,000 Posts: []
Release a CA NA pub: [] | Release a CFNA Pub: []
Pro C++ Coder: [] | Pro VB Coder: []
[IMG]https://images.encyclopediadramatic*****m/images/5/57/Pedobear_a.gif[/IMG]
Don't forget:
Nice coding. Both of you
Don't fight about which code to use though D:
No I do not make game hacks anymore, please stop asking.
ken53406 (12-30-2010)
Eugh, timer is a much better option unless you're running this in a different thread with proper delegates. System.Threading.Thread.Sleep sleeps the thread that the code was executed from, which in this case will be the UI thread. This means that during that sleep time, no other code on the UI thread will be executed. If you're trying to have scrolling text running asynchronously, either use a timer or another thread. The timer still runs on the UI thread, but won't lag the thread. Here's one with delegates and threading:
[php]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim scrollThread As New Threading.Thread(AddressOf Scrolling)
scrollThread.Start()
End Sub
Private Delegate Sub MoveLabelInvoker(ByVal lbl As Label)
Private Sub MoveLabel(ByVal lbl As Label)
If lbl.InvokeRequired Then
lbl.Invoke(New MoveLabelInvoker(AddressOf MoveLabel), lbl)
Else
If Not lbl.Left + lbl.Width <= 0 Then
lbl.Left -= 1
Else
lbl.Left = Me.Width
End If
End If
End Sub
Private Sub Scrolling()
Do
MoveLabel(Me.Label1)
System.Threading.Thread.Sleep(30)
Loop
End Sub
[/php]
Enjoy.
Last edited by Jason; 12-31-2010 at 09:37 PM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Bombsaway707 (01-07-2011),ken53406 (01-04-2011)
I assumed he would be using different threads.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
ken53406 (01-04-2011)
you can keep the label in the same position with this:
(undah the timah)
so this would happen:Code:label1.text = label1.text + label1.remove(1,label1.length) 'copies the first letter to the end label1.remove(0,1) ' removes the first letter
scrolling
crollings
rollingsc
ollingscr
llingscro
lingscrol
ingscroll
ngscrolli
gscrollin
scrolling
and so on...
Last edited by mnpeepno2; 12-31-2010 at 11:35 PM.
i used youtube i found a tut that works but doesn't reset
~Mohandas GandhiA man is but the product of his thoughts what he thinks, he becomes.
~ ImmortalA Genius is nothing with out an idea, An idea is always an idea even without a genius.
Last edited by ken53406; 01-04-2011 at 11:06 AM.
troll says: FUK YO COUCH NIGGA!
V[img]https://www.******************/forums/images/smilies/troll_run.gif[/img]
My goals list:
Legend:
Complete - Incomplete -
30 Posts: [] | 50 Posts: []
70 Posts: [] | 100 Posts: []
500 Posts: [] | 1,000 Posts: []
Release a CA NA pub: [] | Release a CFNA Pub: []
Pro C++ Coder: [] | Pro VB Coder: []
[IMG]https://images.encyclopediadramatic*****m/images/5/57/Pedobear_a.gif[/IMG]
Don't forget:
ken53406 (01-05-2011)