How to make the app wait X amount of seconds be4 next event
I already made an application that generates a cfg file with scripts and stuff for a game, now I am just modifiying it and adding new GUI. I was wondering if it would be possible to make the application do an event, then wait X amount of seconds, then the next event? All I need is the eventcode to put between events to make it wait.
[334 byte] By [
thphaca] at [2007-11-11 6:28:30]

# 2 Re: How to make the app wait X amount of seconds be4 next event
Here is just some example after you put one timer control on your form.
Option Explicit
Dim FirstTime as Integer, SecondTime as Integer
Private Sub Form_Load()
'make the invertal thicking every one second
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
if FirstTime >= 0 then
FirstTime = FirstTime + 1
end if
'do some code here
If FirstTime = 10 then
MsgBox "Hey it's already ten seconds"
SecondTime = 10
FirstTime = -1
End If
'another code here
If SecondTime <= 10 then
SecondTime = SecondTime - 1
End If
If SecondTime = 0 then
Timer1.InterVal = 0
MsgBox "Time is up..."
End If
End Sub
# 3 Re: How to make the app wait X amount of seconds be4 next event
Thank you very much. I knew that the timer had something to do with, well, "time". But, then I thought that there was a code that will do it for you.
BTW: Where did you guys learn that stuff? If youlearned it ffrom a book, can you tell me a recommended website? I have found many sites, yet, they don't really make me want to learn.
# 4 Re: How to make the app wait X amount of seconds be4 next event
Well MSDN is still the most valuable treasure for all VB developpers. There is a lot of books you can read, MS Press books is good choise too, there is one that is my favorite is from Fransesco Balena, but i forgot the title.
Well i'm not advising you to be bad, if you feel lazy to browsing, try some P2P client software like Shareaza or LimeWire, you'll find anything you wanted to download. Else cause i'm a newbie and P2P maniac, you can ask the moderator or all the peoples in here to give you some advise all the sites you can go through for.
Please forgive me for this post about P2P.
# 5 Re: How to make the app wait X amount of seconds be4 next event
Thanks for that, I have seen msdn on there, although I have not attempted to actually download it though, because i forgot, but maybe now I will.
# 6 Re: How to make the app wait X amount of seconds be4 next event
I got it, all i had to do was make an action initiate when timer goes off then disable the timer.