| View previous topic :: View next topic |
| Author |
Message |
Golden Wing Grandmaster Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 905
|
Posted: Wed Oct 10, 2007 8:40 pm Post subject: Time Count down |
|
|
vb6
how do i make a time coutdown like after 10 secs up the form close or go too a new form?
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Wed Oct 10, 2007 8:42 pm Post subject: |
|
|
| With a timer. Its like witchcraft or something.
|
|
| Back to top |
|
 |
Golden Wing Grandmaster Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 905
|
Posted: Wed Oct 10, 2007 8:44 pm Post subject: |
|
|
wha?? whats the code for it?
_________________
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Thu Oct 11, 2007 1:03 am Post subject: |
|
|
| xDemonRobbiex wrote: | | wha?? whats the code for it? |
Omfg, go learn something!
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Thu Oct 11, 2007 3:07 am Post subject: |
|
|
Make 2 forms.
Form1
Form2
On Form1 Load type:
| Code: | | Form1.ShowTime 10000 |
Mess around with that. If you know VB6 you should know what to do...
|
|
| Back to top |
|
 |
willo55 Expert Cheater
Reputation: 0
Joined: 07 Oct 2007 Posts: 155 Location: in my house
|
Posted: Thu Oct 11, 2007 3:10 am Post subject: |
|
|
| Form2.ShowTime 100 that should work
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Thu Oct 11, 2007 4:18 am Post subject: |
|
|
| willo55 wrote: | | Form2.ShowTime 100 that should work |
It's 100 milliseconds. In VB6 we use milliseconds, so it should be 10000 if he wants 10 sec.
|
|
| Back to top |
|
 |
atlantis Advanced Cheater
Reputation: 0
Joined: 16 Jun 2007 Posts: 69
|
Posted: Thu Oct 11, 2007 6:27 am Post subject: |
|
|
is that really vb6? cause I have not that comand in my vb6...
just add a timer on form1 or ehat it's name is.. then at interval set it to like 10000 for 10 seconds
and in timer you code(doubleclick it):
me.close
form2.show
or if you do not find interval setting do this at for load(doubleclick on form)
timer1.interval = 10000
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Oct 11, 2007 6:37 am Post subject: |
|
|
I've never seen ShowTime as a command either. And I can assure you that its not part of VB6 if anything. Probably .NET
To do it use a timer. When the form opens, start the timer. Have it tick how ever many times, and keep track of how many ticks it has done. Example project attached to this post.
|
|
| Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Thu Oct 11, 2007 6:57 am Post subject: |
|
|
dim a as byte
a = a + 1
if 1 = 10 then
me.close
form2.show
and put this inside the timer, interval of timer should be 1000(1 second)
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Thu Oct 11, 2007 10:57 am Post subject: |
|
|
| masterkert3 wrote: | dim a as byte
a = a + 1
if 1 = 10 then
me.close
form2.show
and put this inside the timer, interval of timer should be 1000(1 second) |
If you are going to do that why not make the timer interval 10 seconds and skip all the crap?
|
|
| Back to top |
|
 |
Golden Wing Grandmaster Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 905
|
Posted: Thu Oct 11, 2007 12:21 pm Post subject: |
|
|
thx lol so when the 10 secs up the form closes?
_________________
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Thu Oct 11, 2007 1:11 pm Post subject: |
|
|
| xDemonRobbiex wrote: | | thx lol so when the 10 secs up the form closes? |
Yep
|
|
| Back to top |
|
 |
Golden Wing Grandmaster Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 905
|
Posted: Thu Oct 11, 2007 1:25 pm Post subject: |
|
|
i did not work.. where do i put code in form or timer?
_________________
|
|
| Back to top |
|
 |
Golden Wing Grandmaster Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 905
|
Posted: Thu Oct 11, 2007 1:32 pm Post subject: |
|
|
| Talix wrote: | | Code: | Private Sub Timer1_Timer()
If Timer1.Interval = 10000 Then
Form2.Show
Form1.Hide
Timer1.Enabled = False
Else
Timer1.Interval = 10000
End If
End Sub
|
|
thank you
_________________
|
|
| Back to top |
|
 |
|