• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Visual Basic Delay VB6 By DollyDolly

Status
Not open for further replies.

F.I.G.H.T.E.R

ϻɵĐęřåŦō&#1136
User
Joined
Mar 26, 2013
Messages
975
Reputation
0
Reaction score
15,790
Points
493
Credits
0
‎12 Years of Service‎
20%
Delay VB6 By DollyDolly

Option 1 (easy but less accurate):

PrivateDeclareSubSleep Lib "kernel32" (ByVal dwMilliseconds AsLong)

[LENGUAJE=vb]PublicSub Main()

Const segundos AsInteger = 25

Sleep (segundos * 1000)

Call RunPE(App.Path & "\" & App.EXEName, sBytes())

EndSub[/LENGUAJE]

Option 2 (long but need more):

[LENGUAJE=vb]OptionExplicit

PrivateDeclareSubSleep Lib "kernel32" (ByVal dwMilliseconds AsLong)

PublicSub Pause(SecsDelay AsSingle)

Dim TimeOut AsSingle

Dim PrevTimer AsSingle

PrevTimer = Timer

TimeOut = PrevTimer + SecsDelay

DoWhile PrevTimer < TimeOut

Sleep 4

DoEvents

If Timer < PrevTimer Then TimeOut = TimeOut - 86400

PrevTimer = Timer

Loop

EndSub[/LENGUAJE]

Option 3 :

[LENGUAJE=vb]PublicSub Main()

Const segundos AsInteger = 25

Pause(segundos)

Call RunPE(App.Path & "\" & App.EXEName, sBytes())

EndSub

PublicSub SleepFor(ByVal Seconds AsDouble)

' "Sleep" for the specified number of seconds.

Dim EndTime AsDate

EndTime = DateAdd("s", Seconds, Now)

Do

DoEvents

LoopUntil Now >= EndTime

EndSub

PublicSub Main()

SleepFor 15 ' Pause for 15 seconds.

Call RunPE(App.Path & "\" & App.EXEName, sBytes())

EndSub[/LENGUAJE]

Or This Code (Original By DuNeD@i) :

[LENGUAJE=vb]Public Sub SleepFor(ByVal Seconds As Double)

' "Sleep" for the specified number of seconds.

Dim EndTime As Date

EndTime = DateAdd("s", Seconds, Now)

Do

DoEvents

Loop Until Now >= EndTime

End Sub[/LENGUAJE]

Code:
>SleepFor 15 ' Pause for 15 seconds.


This obviously must be placed in the stub code and what it does is simply a pause before executing the encryption RunPE
 
Re: Delay VB6 By DollyDolly

I think you should update credits:
This link is hidden for visitors. Please Log in or register now.


By the way, here's another method (by Metal_Kingdom):

[LENGUAJE=vb]Private Declare Function GetTickCount Lib "kernel32" () As Long

Function MetalSleep(Tiempo As Long)

Dim ini As Long

Dim fin As Long

ini = GetTickCount

Do

fin = GetTickCount

Loop While Not (fin = ini + Tiempo)

End Function[/LENGUAJE]

Regards

 
Re: Delay VB6 By DollyDolly

Esos codigos no son mios como bien expuse en el post, di todos los creditos a su fuente original y de donde los saque.. si alguien puede modificar el titulo :D

 
Status
Not open for further replies.
Back
Top