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]Thread.Sleep alternative[Solved]

Post[Help]Thread.Sleep alternative[Solved]

Posts 1–15 of 22 · Page 1 of 2
L4
l4sth4ck3r
[Help]Thread.Sleep alternative[Solved]
Hi.

as you know , sleep freeze everything in the application.


i need the same thing but not freezing everything.

because im making something for msn.

my code in timer1 is ( interval 2000 )
Code:
sendkeys.send(richtextbox1.text)
sendkeys.send(textbox2.text)
sleep(2000)
sendkeys.send(F8)
my code in timer2 is ( interval 350 )
Code:
Randomize()
TextBox2.Text = CStr(Int(Rnd() * 999))

the problem is after " sendkeys.send(richtextbox.text) " the whole application freeze for 2 sec ( 2000ms ) so my timer2 stop generating random number and it send over 2 time the same number

what can i do ??

thx
#1 · 16y ago
MJLover
MJLover
Quote Originally Posted by l4sth4ck3r View Post
Hi.

as you know , sleep freeze everything in the application.


i need the same thing but not freezing everything.

because im making something for msn.

my code in timer1 is ( interval 2000 )
Code:
sendkeys.send(richtextbox1.text)
sendkeys.send(textbox2.text)
sleep(2000)
sendkeys.send(F8)
my code in timer2 is ( interval 350 )
Code:
Randomize()
TextBox2.Text = CStr(Int(Rnd() * 999))

the problem is after " sendkeys.send(richtextbox.text) " the whole application freeze for 2 sec ( 2000ms ) so my timer2 stop generating random number and it send over 2 time the same number

what can i do ??

thx
First thing that I don't understand. Why are you using two timers, when you can do this just by using 1 ??

The easy solution would be to put this code before sending the keys:
Code:
Randomize()
TextBox2.Text = CStr(Int(Rnd() * 999))
Because Timer2 has nothing to do with sending, means the timer1 will send the keys of the text written in textbox2. So, its a better solution. Also put this code before sleep(2000):
Code:
Application.DoEvents()
This causes the application to perform events even if the program hangs !!

Nextgen1 wrote some piece of custom sleeping. If my method doesn't help you, you can ask him for that !!

Regards
#2 · 16y ago
L4
l4sth4ck3r
ok thanks ill try this.

why 2 timer ? ANSWER : timer 1 is for sendkey at 2000ms i cant make it faster ( reliability )
timer 1 is generating new number each 350ms. i will have other timer that will use random number too but with different interval ( 7000 ) so i keep it a 350 so that way anything using it get new number .

anywya thx ill give you news about it.
#3 · 16y ago
L4
l4sth4ck3r
ok so i tryed.
nothing change.

the sleep still freeze the whole app.

see the new project i amde just to try it

Code:
Imports System.Threading.Thread
Public Class Form1

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Randomize()
        TextBox1.Text = CStr(Int(Rnd() * 999))
        Application.DoEvents()
        Sleep(1000)
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        Randomize()
        TextBox2.Text = CStr(Int(Rnd() * 99999))
    End Sub
End Class
NextGen1: OutSide Link Removed.

both timer set to 100 ms

still freeze whole app so the Random 2 sleep with the Random 1

yes for this one i could have used only 1 timer but my other project realy need more timer .
#4 · edited 16y ago · 16y ago
L4
l4sth4ck3r
ok i found wht thing you was talking about
Code:
Private Sub Sleep(ByVal PauseTime As Double)

        Dim Tind As Int16
        For Tind = 1 To PauseTime / 50
            Threading.Thread.Sleep(50)
            Application.DoEvents()
        Next

    End Sub
dont seem to work.
#5 · 16y ago
Blubb1337
Blubb1337
So you got a interval of 2000 why do you then let it sleep again?

I don't get that part...
#6 · 16y ago
L4
l4sth4ck3r
Quote Originally Posted by Blubb1337 View Post
So you got a interval of 2000 why do you then let it sleep again?

I don't get that part...


if i dont sleep it it keep sending it again and again and again and again non-stop = huge ressource or crash. so i need to pose it a bit then he restart himself after 2 second
#7 · 16y ago
Blubb1337
Blubb1337
My pc/program does not even crash with a interval of 50 without sleep....
#8 · 16y ago
L4
l4sth4ck3r
Quote Originally Posted by Blubb1337 View Post
My pc/program does not even crash with a interval of 50 without sleep....
READ dude..

its for msn. typing too fast in msn = crash.

my brother have high-end computer fresh install and when he start the app after 2 minute msn crash.

not sur what his comp but i know :
processor intel I7
8Gb ram DDR3
2x 1TB hd.

i must say this app isnt typing in blocnote but in msn.. dont ask too much lol
#9 · 16y ago
NextGen1
NextGen1


That's My code from the snippets from the snippets Vault and it works fine

what you have to do is use

Sleep(2000)

I have tested it, and so has a few others

@ Other stuff
Your New, So....

A. I Removed your outside link, Outside Links our not allowed without permission.

B. Watch the Double posts, use the Edit Button


#10 · edited 16y ago · 16y ago
Taylor Swift
Taylor Swift
cant you just use Hibernate? lol
#11 · 16y ago
L4
l4sth4ck3r
Quote Originally Posted by NextGen1 View Post


That's My code from the snippets from the snippets Vault and it works fine

what you have to do is use

Sleep(2000)

I have tested it, and so has a few others

@ Other stuff
Your New, So....

A. I Removed your outside link, Outside Links our not allowed without permission.

B. Watch the Double posts, use the Edit Button



i tryed your snipet but didnt worked.
it was only sleeping 50ms and again for everything.

if you could make a little project that i can have a look and make some try ?
#12 · 16y ago
NextGen1
NextGen1
Sure, One Second I will upload it here in this post

Edit:

Attached, It is nothing more then a Button which will

set label1.text + 1 then sleep for 3 seconds then + 1 and sleep for 3 more seconds.

with application.doevents.


It is attached:
Here is Virus scan
http://www.virustotal.com/analisis/1...0a9-1269523087

#13 · edited 16y ago · 16y ago
Blubb1337
Blubb1337
Quote Originally Posted by l4sth4ck3r View Post
READ dude..

its for msn. typing too fast in msn = crash.

my brother have high-end computer fresh install and when he start the app after 2 minute msn crash.

not sur what his comp but i know :
processor intel I7
8Gb ram DDR3
2x 1TB hd.

i must say this app isnt typing in blocnote but in msn.. dont ask too much lol
Well, I tried it on msn too and it was working fine. nvm then...
#14 · 16y ago
MJLover
MJLover
Ya, works perfect for me too, may be you have an issue with your MSN !!
#15 · edited 16y ago · 16y ago
Posts 1–15 of 22 · Page 1 of 2

Post a Reply

Similar Threads

  • ADMINS CROSS OUT SOLVED HELP THREADS!By tenko in Combat Arms Discussions
    1Last post 16y ago
  • [Help]Sleep/Pause[Solved]By jakobkorber in Visual Basic Programming
    11Last post 16y ago
  • [SOLVED] Yes, a help thread coming from my directionBy Archangel in Call of Duty Modern Warfare 2 Help
    16Last post 16y ago
  • [SOLVED] Help threadBy ♪~ ᕕ(ᐛ)ᕗ in Call of Duty Modern Warfare 2 Help
    7Last post 16y ago
  • HELP THREAD(post ANY questions here)By Obama in Combat Arms Hacks & Cheats
    1,490Last post 17y ago

Tags for this Thread

None