Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help]How to make scrolling text?[solved]

[Help]How to make scrolling text?[solved]

Posts 1–15 of 19 · Page 1 of 2
Bombsaway707
Bombsaway707
[Help]How to make scrolling text?[solved]
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
#1 · 15y ago
ken53406
ken53406
Put label on form1, put timer on form1.
timer 1 enabled, interval 100.
go into timer1 code.

put in:
Code:
Label1.Left -= 5
If Label1.Left <= -Width Then
Label1.Left = Width
End If
End Sub
End Class
Put that shit under Private Sub Timer1_Tick
#2 · 15y ago
Lolland
Lolland
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
#3 · edited 15y ago · 15y ago
ken53406
ken53406
My way works exactly the same, its smoother and its a million times easier lol
#4 · 15y ago
Lolland
Lolland
Mine should run smoother now.
#5 · 15y ago
ken53406
ken53406
Erm mmkay idc just posting to help. Whichever he decides is best
#6 · 15y ago
flameswor10
flameswor10
Nice coding. Both of you
Don't fight about which code to use though D:
#7 · 15y ago
Jason
Jason
Quote Originally Posted by Lolland View Post
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
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.
#8 · edited 15y ago · 15y ago
Lolland
Lolland
I assumed he would be using different threads.
#9 · 15y ago
Jason
Jason
Quote Originally Posted by Lolland View Post
I assumed he would be using different threads.
Well then it's going to fail regardless 'cos you're accessing the control outside the thread it was created on = dead.
#10 · 15y ago
mnpeepno2
mnpeepno2
you can keep the label in the same position with this:

(undah the timah)
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
so this would happen:

scrolling
crollings
rollingsc
ollingscr
llingscro
lingscrol
ingscroll
ngscrolli
gscrollin
scrolling

and so on...
#11 · edited 15y ago · 15y ago
cosconub
cosconub
i used youtube i found a tut that works but doesn't reset
#12 · 15y ago
Blubb1337
Blubb1337
Quote Originally Posted by cosconub View Post
i used youtube i found a tut that works but doesn't reset
You don't need a non-working youtube tutorial for such task
#13 · 15y ago
ken53406
ken53406
Quote Originally Posted by Jason View Post


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.
As i stated my way would work better... Thanks for posting your shit jason, way better than mine and lollands good work!

I also noticed no one thanked me, lolland, or jason for helping Bombs... I guess lately people have forgotten THERES A FUCKING THANKS BUTTON!!!!!!!!!
#14 · edited 15y ago · 15y ago
HA
Hawky1337
Quote Originally Posted by ken53406 View Post
As i stated my way would work better... Thanks for posting your shit jason, way better than mine and lollands good work!

I also noticed no one thanked me, lolland, or jason for helping Bombs... I guess lately people have forgotten THERES A FUCKING THANKS BUTTON!!!!!!!!!
That's common on MPGH
#15 · 15y ago
Posts 1–15 of 19 · Page 1 of 2

Post a Reply

Tags for this Thread

None