How can i create a 20 mins.countdown timer in VB 6.0?
-
how can i create a 20 minutes countdown timer in VB 6.0 with a Start,Pause and Stop command..please help..thanks
-
Answer:
this is a 5 second timer. You will have to change things around Dim x As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick x = x - 1 Label2.Text = Int(x / 10) & "." & x Mod 10 If x < 1 Then Timer1.Enabled = False MsgBox("BOOM") End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Timer1.Enabled = False Then Timer1.Enabled = True Button1.Text = "Stop" Else Timer1.Enabled = True Timer1.Enabled = False Button1.Text = "Start" End If If x = 7 Then Timer1.Stop() MsgBox("good job, 007") End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Timer1.Enabled = False Then x = 40 End If Label2.Text = "4.0" End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load x = 50 End Sub End Class
Jhanine at Yahoo! Answers Visit the source
Related Q & A:
- How can i create a mobile application server?Best solution by Stack Overflow
- How can i create a new blog?Best solution by Yahoo! Answers
- How can I create a new font?Best solution by Yahoo! Answers
- How can I create a cute, artsy, unique facebook profile?Best solution by Quora
- How can I create a yahoo group?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.