| | |
timer countdown help
![]() |
•
•
Join Date: Dec 2005
Posts: 11
Reputation:
Solved Threads: 0
hi all, ive just started learning VB6 and have come across a problem or two. can you guys help.
i am trying to create a countdown timer, i have made one with a timer and textboxs (5 textboxs, mmm:ss).
but i have seen some examples using pictures as the numbers. wondered how you would do this?
P.S, i am using a Resource File to store all pictures, so its all included into the exe.
another question is, how would i enable a button soon the timer reaches 004:00 (4 mins). is there a way to do with with numbers and pictures(as numbers, from the above question)?
finding is hard to explain, please post if you don't know what im on about. :mrgreen:
regards
solway
i am trying to create a countdown timer, i have made one with a timer and textboxs (5 textboxs, mmm:ss).
but i have seen some examples using pictures as the numbers. wondered how you would do this?
P.S, i am using a Resource File to store all pictures, so its all included into the exe.
another question is, how would i enable a button soon the timer reaches 004:00 (4 mins). is there a way to do with with numbers and pictures(as numbers, from the above question)?
finding is hard to explain, please post if you don't know what im on about. :mrgreen:
regards
solway
Hi
You could have a series of picture controls (or image controls), and load pictures into them using the load picture method. For each digit, (having done the maths to get separate variables for each one) you could use Select Case to load the pictures:
I'm not sure about the resource control implementation.
As for your button, on the form load event disable it:
then, when your minutes variable gets to 4,
Hope this helps, have a good Christmas
AlanC
You could have a series of picture controls (or image controls), and load pictures into them using the load picture method. For each digit, (having done the maths to get separate variables for each one) you could use Select Case to load the pictures:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Select case nTensMinutes case 0 picture1.picture = loadpicture ("zero.gif") case 1 picture1.picture = loadpicture ("one.gif") ' ' ' ' End Select
I'm not sure about the resource control implementation.
As for your button, on the form load event disable it:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Form_Load() Command1.Enabled=false ' etc ' etc
then, when your minutes variable gets to 4,
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
If nMinutes = 4 then command1.enabled = true End If
Hope this helps, have a good Christmas
AlanC
•
•
Join Date: Dec 2005
Posts: 11
Reputation:
Solved Threads: 0
thanks for the help, well the way i done it, was properly the long way round.
a normal count down timer using textboxs. then a resource file loaded with pictures. and telling it to change to a certain picture in a picturebox, soon the timer reaches a certain number.
thanks for the alarm code bit (end code on the post), i couldn't figure that one out.
a normal count down timer using textboxs. then a resource file loaded with pictures. and telling it to change to a certain picture in a picturebox, soon the timer reaches a certain number.
thanks for the alarm code bit (end code on the post), i couldn't figure that one out.
![]() |
Similar Threads
- Visual Basic Timer/Clock/Countdown. (Visual Basic 4 / 5 / 6)
- Pause/Restart Countdown Timer Question (VB.NET)
- Countdown Timer (VB.NET)
- Timer Countdown (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: I need help
- Next Thread: senior project
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





