Академический Документы
Профессиональный Документы
Культура Документы
Delay Timer
VB Code
VB Net
VB Tutorial
Level:
Navigate To
MS Access VB Code
OpenGateSw.net/UI-Builder
Web 2.0 Menu Look & Feel in MS Access, Free Demo!
Written By TheVBProgramer.
Home
Tutorials
Source Code Samples
VB.NET Tutorials
Timer Example 1
Forums
Articles
External Links
Advertise Here!
Contact Us
Guides
Beginner Guide
Controls Guide
Understanding forms
Timer control
Multiple Forms
Everything Images
Control arrays
Option Buttons
Check Boxes
Math Game
(o) Hangman
(o) Tic Tac Toe
(o) Calculator
(o) Cryptogram
(o) Concentration
Database Guide
User login
Username: *
Password: *
Log in
Create new account
Request new password
Similar links
Cara Memperbesar Buah Dada
entre otros.Bootcamp Gesundheit
Babak Final Liga Champions 2013
Prediksi Getafe vs Real Sociedad
Cara Terbaik Mengatasi Ejakulasi Dini
Cewek Cantik Kelihatan Celana Dalam Tanpa Sensor
Pantun Jenaka
Yoyoipads.com - get free ipad anywhere
- ?
Subscribe
Please Help!!!!
I need to create a Time Calculator in Visual Basic 2010
Create a VB application that lets the user enter a number of seconds and works as
follows:
- there are 60 seconds in a minute. If the number of seconds entered by the user is
greater than or equal to 60, the program should display the number of minutes in that
many seconds.
- there are 3,600 seconds in an hour. If the number of seconds entered by the user is
greater that or equal to 3,600, the program should display the number of hours in that
many seconds
- there are 86,400 seconds in a day. If the number of seconds entered by the user is
greater than or equal to 86,400, the program should display the number of days in that
many seconds.
reply
excellent tutorial.i know vb basics.but dont have much idea about vb6.i found this tutorial
much helpfull and easy to learn. thanks for giving this
reply
plz;
send this code soon.........
reply
Timer
Hi
M very new to vb and m trying to create a small game. I have 4 picture box n i want the
pic to b loaded in the first box as soon as i run it and the 2nd box shud display the pic
after 1s and the 3rd 1 sec aftr the 2nd displays n so on. How can i use timer for tis???
Pls help me out with this.M using vb 2010.Expecting a rly sooner.
Thanks in advance.
reply
Hi! I'm a total newb to VB but I'm trying to make a timer to refresh a web page and display
it on a framless window. I've got the window part down but I cant figure out the timer
module. Maybe a 60 minute refresh would work for it....
reply
THANKS
I LIKE THIS PAGE. I KNEW NOTHING ABOUT TIMERS. NOE I'M AN EXPERT.
I LIKE TO THANK YOU FOR THIS FINE HELP.
NICE DAY
reply
help me guys
vb6
please give me a code of a program that if the user entered a wrong username and/or
password, the message box will prompt "invalid entry, try again". And after three(3)
attemps of wrong entry, message box "Program will end".....
thanks..!:)
reply
The Code :)
The Code you are looking for depend on what Kind of Username and/or password
you what to verify, that is to say if the Username and/or password is stored in a
Database.
The example Codes below is for Username and/or password stored in a Database
and if the Username and/or password dose not match with what is in the database it
will bring up a message box.
I hope it will help.
Private Sub CmdLogin_Click()
Dim varbookmark As Variant
Dim password As String
Set db = OpenDatabase(App.Path + "\data\SYSTEM.mdb") 'Location of your
Database
Set rs = db.OpenRecordset("users") 'Table in the Database where usernames and
passwords are stored
If TxtUsername.Text = "" Then
MsgBox "ENTER USERNAME TO PROCEED!", vbCritical, "Error..."
TxtUsername.SetFocus
Exit Sub
End If
If TxtPassword.Text = "" Then
MsgBox "ENTER PASSWORD TO PROCEED!", vbCritical, "Error..."
TxtPassword.SetFocus
Exit Sub
End If
With rs
.MoveFirst
.Index = "user_name" 'Ensure it is the same will the index in the Database
varbookmark = .Bookmark
.Seek "=", (TxtUsername.Text) 'Searching the Database to see if such username
exist
If .NoMatch Then
MsgBox "WRONG USERNAME", vbCritical, "FAILED"
.Bookmark = varbookmark
Exit Sub
End If
'Searching the Database to see if such password is for that username
If rs.RecordCount <> 0 Then
password = Trim(rs("password"))
End If
If password <> Trim(TxtPassword.Text) Then
MsgBox "Incorrect Password!", vbExclamation, "FAILED"
Else
Timer1.Enabled = True
End If
End With
End Sub
reply
Need help
help
Move the Dim statement outside of the subroutine. Right now, whenever
Timer1_Timer is called, a is reinitialized and resets itself to 0.
reply
YOU ROCKZZZ..!!!
YOU ROCKZZZ..!!!
reply
Blinking label
Hi,
I assumed that your objective is to display a blinking label on your form. If that's the
case please take a look on the codes below.
'======================================================================
Option Explicit
Private Sub Timer1_Timer()
With Me
If .Label1.Visible Then
.Label1.Visible = False
Else
.Label1.Visible = True
End If
End With
End Sub
'======================================================================
I have used Timer object instead of an integer variable because that is the most
practical way if you only want to display a blinking label on your form.
I hope this can help.
Best regards,
Tobz
reply
Dim a As Integer a = 0
Dim a As Integer
a = 0 <- each time the timer fire, your var a=0
a = a + 1 <- a=0+1=1 => in if clause a mod 2 = 1 mod 2
you should do this:
public a as integer
...
...
Private Sub Timer1_Timer()
a=a+1
If a Mod 2 = 0 Then
Label1.Visible = True
Else
Label1.Visible = False
End If
End Sub
reply
Dear all,
Please help me, i need source code for my project. i need to start/run port bit for parallel
port for running equipment as motor by timer. i have eight motors. for example i need to
start the motor at 07:00 AM and stop at 9:00 AM. and the others have a timer too
reply
VB 6 Help me
Service?
Could this be done having an .exe file as a service? Won't windows try to restart a
service if it has failed?
Just a thought...
reply
hey
i need help
I got a textbox and i have to know the source for get it sending a X number of messages.
It shall start with a button or a DomainUpDown
In visual basic 2011
reply
Simple Game
vb
reply vb
reply
images
Hello i am trying to make an image visible but only for a certain amount of time then it
goes invisible again automatically but i can't seem to figure out how to do this.
reply
research
i have cybercafe and most times bowsers will logout their time while downloading
something, and it is on my own expense. someone told me that, a cafe he visited, once
one's time logout, what he is doing stops. i need your hlep on please, is it a software or
what, 'cos i need it.... plz.
reply
Colour light
In my vb form there are 3 circles that got in shapes control. Firstly i want to colour first
circle as green, second as yellow and third as red. This should be as colour light. Always
want to colour this colour light respectively. Please give codes to construct this
programme.
reply
objective: show progress while a command is being exicuted through the cmd.exe or
shell or some DOS command command.
showing progress for reading a text file is easy. I just get the record or line count and do
a loop until the max count is reached.
how do I show the progress of a shell command? what interupt or event or property must
I access?
I can see the cmd.exe icon in the task bar while i am executing a dos directory search.
what , how do i keep time of a shell command?
reply
So I'm creating a form in VB 2010 such that when you go to close the application, it wait 3
sec before it actually closes. I've looked all over for help with this and can only find how
to display the timer or delay the timer from starting. If anyone has any tips, that would be
awesome!!!!
reply
I'm trying to program an image to turn on after thirty seconds, to shut off three minutes
after the image appears, and to appear again after thirty seconds.
I know what the code would be, however, I cannot enter more than 65 seconds for the
interval property (the Visual Basic 6 Super Bible says the Interval property can range
from 0 ~ 65 seconds). Does anyone know of a way to loop a timer to increase the amount
of time enterable in the Interval Property?
reply
and will also compute the days of absent ot hours and late .. please help me .. :) i need it
asap .. thank you ..
reply
then, he will click the time in button .. and it will be recorded .. supposedly that he click
again the time in , this time it will not be recorded a msgbox will pop-up that he already
log-in .. and in a time out button , it will also be recorded same with the time out if he
supposedly click again ..
reply
here is my own vb program,its really tear me down.could you guys help me?its
connected with MS excel..
let's say if i type place like Newyork,then i wanna the price is 20
if i type the place like Hawaii,then i wanna the price is 30
and all places of all others will be 40.
so the program i own its like :
function price(place as variant)as integer
if place=newyork then price=20
elseif place=hawaii then price=30
else price=40
end if
end function
reply
My dear frnd i'm new in vb bt wit wat u said u hv 2 declare ur d countrys txts as
variables
reply
Done!
I hope this code will help you in a way:
Option Explicit
Dim I As Byte
Private Sub Form_Load()
Combo1.AddItem "Select hours..."
For I = 1 To 23
Combo1.AddItem I
Next
Text1.Text = Format(Now, "dd/mm/yy - hh:mm:ss")
Combo1.ListIndex = 0
End Sub
Private Sub Combo1_Click()
If Combo1.ListIndex > 0 Then
Text2.Text = Format(Now + CDate(Combo1.ListIndex & ":00:00"), "dd/mm/yy hh:mm:ss")
Else
Text2.Text = Combo1.Text
End If
End Sub
Private Sub Text1_Change()
If Combo1.ListIndex > 0 Then _
Text2.Text = Format(Now + CDate(Combo1.ListIndex & ":00:00"), "dd/mm/yy hh:mm:ss")
End Sub
Private Sub Timer1_Timer()
Text1.Text = Format(Now, "dd/mm/yy - hh:mm:ss")
End Sub
Create a new form with 2 text boxes, 1 combo box and a timer. Make timer's interval
property to 1000 (1 sec) and paste the above code.
reply
in general: Dim
in general:
Dim intLogInAttempts is Ingeter = 0
in a button:
If (your password/username is correct) then
(login)
else
intLogInAttempts = intLogInAttempts + 1
If intLogInAttempts = 3 then
intLogInAttempts = 0
Timer1.Enabled = True
(the log in button?).Enabled = False
End If
End If
in a timer:
(the log in button?).Enabled = True
AT LEAST POST AN
EXAMPLE OF
Hi!
Please the code below.
Option Explicit
Private Const userName As String = "Admin"
Private Const password As String = "Pass"
Private noOfAttempts As Integer
Private Sub Command1_Click()
With Me
If .txtUsername.Text = userName And .txtPassword.Text = password Then
MsgBox "Access granted.", vbInformation, "Granted"
Rem To do
Else
MsgBox "Invalid username and/or password.", vbCritical, "Denied"
noOfAttempts = noOfAttempts + 1
If noOfAttempts = 3 Then
.txtUsername.Enabled = False
.txtPassword.Enabled = False
.Command1.Enabled = False
.tmrEnableTextboxes.Enabled = True
End If
End If
End With
End Sub
Private Sub tmrEnableTextboxes_Timer()
With Me
.tmrEnableTextboxes.Enabled = False
.txtUsername.Enabled = True
.txtPassword.Enabled = True
.Command1.Enabled = True
End With
End Sub
I hope this can help.
Best regards,
Tobz
reply
use sleep.
Hi
Thanks for your codes on Internet cafe business
In VB 6.0 , I got an error while executing the below command.Is myTimeOutCon a
function ?
rsLoged.open mySQLcode, myTimeOutCon, adOpenDynamic, adLockOptimistic
reply
Hi,
I manage a VB6 application, having lots of forms. The forms are loaded using at central
DialogManager-class.
One form has a timer-control, by default enabled. But by coincidence, I discovered that
the Timer continues after unloading the form, putting a debug.print into the timer1_timer
event. Even if I place a timer1.enabled = false in the form_queryunload, the timer is
continuing (prooved by debug.print in the timer-event).
Why is the timer not flushed when I unload the form, and how can I be sure to kill the
timer?
Thx
Joergen
reply
Kill prg
when I type timer=, it shows true or false. for what does this true or false used???
reply
it is used with
when its true the timer will start to count, when it false the timer will stay at 0
reply
youtube.com
hi
every time i write this for some reason it ses error
tmrTest.Enabled = True
please help
reply
vb
i want a vb code for develop a vb program to stimulate the traffic signals, by using the
following conditions.
I. Form consists of 3 signals Red,Green, & Yellow.
II.Form consists of one timer label, to display the time out signal.
III. While transorming the signal from Red to Green, Signal travel to Yellow.
IV. Time out for Red=180 sec.
V.. Time out for Yellow=60 sec.
VI. . Time out for green=120 sec.
reply
hello Guys
I am new to VB and am implementing a project that transmits a file from server to client.
whilst displaying the contents of the file, i want to implement a delay (say 1sec delay) to
be incorporated between the lines as it is displayed.
i have no idea how to do this.
any suggestions?
please help
thanks
reply
my program
i want to have a code for time in / out of a employee.. in the form there's a textbox that will
display the number of hours of the employee worked base on the time in.. vb 6.0 code
pleasee..
reply
vb
i want more coding of timer control in vb 6.0. This coding will contain more
suffosticated to project or the software.
By using of timer controls we should be various effect to text .
i want some design of login screen.
reply
answer pls..
how can i create a program that will display number 1-10 with delay without using a
timer?
reply
Without timer.
Create a delay routine, then print your number, call delay. It will return when delay is
done and you can print your next number.
Private sub PrintNumber()
dim x as integer
x=0
do
x=x+1
print x
Delay 5 'delay 5 seconds
loop while x<11
end sub
Public Sub Delay(l As Single)
Dim w As Single
w = Timer + l
If w > 86399 Then ' If midnight
w = w - 86400
Do While Timer > 0
DoEvents
Loop
End If
Do While Timer < w
DoEvents
Loop
End Sub
reply
HELP!
heyy we have to make a vb game for assessment and we would like to know how to
move something from one point to another.. someone please reply ASAP
thanx
reply
In a module called
]
Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) H
Dragging = True
StartX = e.X
StartY = e.Y
End Sub
reply
Hello friends,
can u tell me how can i move control at run time?
controls like button,textbox etc....
reply
Hello
Database
There are three text boxes( text1, text2 & text3) on a form bound to a database table.
text1 and text2 are bound to fields of the table. I want to show the value of multiplication
of two boxes. Plz reply. thanks.
reply
i need a timer in all forms..the timer control is in form 1 then the time countdown activates
in all other forms.. is it possible? please help me!
reply
. yes it is possible.
put an label to your form rename it lbltimer , change the text to "0" then
put this code in lbltimer
lbltime.Text = lbltime.Text + 1
If lbltime.Text = 5 Then
btnOK.Enabled = True
Timer1.Stop()
Form2.Show()
Me.Hide()
.....VB 8 codes !
reply
VB 6 animation program.
Hi there!
I made one simple vb 6 program. I did one animation of one engine running and one fan
or cooler runnig too. It individually runnig if I push Start button of it object either engine or
fan. The question is. I would like to add two buttons one Auto and another Manual. When
I push or click the Manual button the fan can not running If I start engine. Did you get the
point? I did engine runnig together with fan or cooler but I would like to add those two
buttons. If I push Auto the two engine and cooler can running together but if I push
Manual button the cooler can not running until I change pushing Auto button. Did you get
it?
reply
Hi I really need help. I want to make a program where when i click on a button the timer
starts to make labels appear with intervals of 5 seconds....should i make a specific timer
for each button? and how do i call the timer function in the required button?
reply
.put an label to your form rename it lbltime , change the text to "0" then
put this code in your button
lbltime.Text = lbltime.Text + 1
If lbltime.Text = 5 Then
btnOK.Enabled = True
Timer1.Stop()
reply
Regarding timer
I m new to VB6 and I want to display time in visual basics 6.0 i.e in the this manner
00:00:01, 00:00:02, 00:00:03 and so on.. and that too one after the other.. can we do
this? plz reply m badly in need
reply
Timer1.Enabled = False
Label9.Enabled = True
Label10.Visible = True
Label10.Enabled = False
Label11.Visible = False
Label1.Caption = 0
Label2.Caption = 0
Label3.Caption = 0
Label4.Caption = 0
Label5.Caption = 0
Label6.Caption = 0
End Sub
'Label Start
Private Sub Label9_Click()
Timer1.Enabled = True
Label10.Enabled = True
Label9.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Label1.Caption + 1
If Label1.Caption = 10 Then
Label2.Caption = Label2.Caption + 1
Label1.Caption = 0
If Label2.Caption = 6 Then
Label3.Caption = Label3.Caption + 1
Label1.Caption = 0
Label2.Caption = 0
If Label3.Caption = 10 Then
Label4.Caption = Label4.Caption + 1
Label1.Caption = 0
Label2.Caption = 0
Label3.Caption = 0
If Label4.Caption = 6 Then
Label5.Caption = Label5.Caption + 1
Label1.Caption = 0
Label2.Caption = 0
Label3.Caption = 0
Label4.Caption = 0
If Label5.Caption = 10 Then
Label6.Caption = Label6.Caption + 1
Label1.Caption = 0
Label2.Caption = 0
Label3.Caption = 0
Label4.Caption = 0
Label5.Caption = 0
End If
End If
End If
End If
End If
End Sub
reply
countdown program
Could any1 please send me a simple countdown program that displays the countdown
of 60 seconds on a label in a single form?
reply
your question
what you have to do is first set a textbox i will just use text1 for the example, then you
need a timer. In the timers code area put the code text1.text = text1.text - 1. put the
number 60 in the textbox and set the interval speed on the timer to 1000 (this is the
equivalent of 1 second in timers)
reply
Count down
Hi Guys can any one guide me on the vb code for Remote controlled car from pc parallel
port
I managed to write code for up,down,right,left, but i want guidance for preset path and
memories the path.
Thanks in advance.
reply
Im new to VB6. Can anybody please help me how to create a simple program which is
intended to continuously count number from 1 up to 100 repeatedly without stopping
unless I press the button stop. At the same time, when I press stop button the screen will
show any random number.
Here's my code but something gets wrong everytime I run this. Can you please help me
figure out why this happen or could you please provide a better code.
Private Sub Command4_Click()
Dim x As Integer
Command5.Caption = "SELECT"
x=1
For x = 1 To 100
Text0.Text = x
If Command5.Caption = "STOP" Then
End
End If
If x=100 then
x=1
End if
Next x
End Sub
Private Sub Command5_Click()
Command5.Caption = "STOP"
Call Randomize
Text0.Text = 1 + Int(100 * Rnd())
End Sub
reply
The Solution
timer
I want to make a project which will make a font smaller to larger and then it will back
larger to smaller at a time. I use this code but I made it half complete. its not working. it
makes the font size larger but I can not make it smaller.
the code I use
Private Sub label1_Load()
Label1.Fontsize = Label1.Fontsize + 5
End sub
Interval was 500 but its growing bigger and bigger. how I can stop it and how I can make
it smaller from the larger size.
It will be great help for me if any body can solve this problem
reply
Hi,
I need a stop watch code in VB which be able to record and report:
1- how many times is being used?
2- the time of both pressing the START button and the STOP button
3- the total time duration
*** this program will be used to record the duration of breaks of the employees in a
company***
thanks alot...wait for your reply
reply
Hello.
I would like to enquire regarding how to i go about displaying the timer in the format of
"mm:ss:ms" (min: sec: millisecond). Have been looking online for references for days,
tried out quite a number of codes too but dont seems to be able to find one as mostly are
those displaying in hh:mm:ss but i need it in milliseconds.
Hope to be able to find someone who can guide me on this as i'm pretty new in Visual
Basic. Thank you.
reply
Multiply/Divide?
I will use "timer" as the timer's name. "msCount", "secCount", and "minCount" will be
the respective time variables. Try setting timer's interval to 1 and:
Private Sub timer_Timer()
msCount = msCount + 1
If msCount > 1000 Then
msCount = msCount - 1000
secCount = secCount + 1
end if
If secCount > 1000 Then
secCount = secCount - 60
minCount = minCount + 1
End If
End Sub
Well darn, syntax highlighting doesn't work :P
Hopefully that should help!
reply
If you use > 1000 then the timer will count to 1001 mili seconds before
switching. Should be >= 1000 or > 999
reply
Hi,
I'm developping an application that reads emails from a server.
I have set the interval of the timer1 to 1000 *30 (i.e. 30 seconds).
In the timer1_timer () subroutine I called another subroutine which makes a connection
with the server using
Winsock1.RemoteHost "hostname"
Winsock1.RemotePort "hosr port"
Winsock1.Connect
and then reads the emails etc.
then dissconnects from the server, and after 30 seconds or whatever repeats the cycle:
connecting to the server
reading emails
dissconnecting from the server.
The problem is that the timer run through the cycle mentioned above only once,
after 30 seconds it does not do anything.
Please help me.
Thanks a lot, appreciate your help
Aiman
reply
real time in vb
anyone know how to write a code for real time counter? Means it can display like a
clock??
reply
Bad Code
Hai Friends,
I finished my project of Production and Rejection related one using ADO. In I design a
welcome and license detail of my project.During MDI form initial it display for 3 seconds.
how to write code for that i paste the timer control in MDI form but i dont know how 2 write
code for this
Please help me
Thanks,
Ramkumar.C
reply
duration
I want to create a splash screen in my excel project. For this I need a timer function. But
in the toolbox the timer button is not showing.
Can anyone please tell me how to add timer in the toolbox....???
reply
Delay Timer
Trying to create a delay timer. Thus far all it does is lock up VB6
Trying to do something, wait some time frame, then proceed with next step of code.
Seem simple but I just don't get it.
Any insight would be greatly appreciated
thank you
Option Explicit
Dim Done As Integer
Dim uh As Integer
Private Sub Form_Load()
Done = 0
Timer1.Enabled = False
Timer1.Interval = 1000
Call RunThis
End Sub
Private Sub RunDelay()
Timer1.Enabled = True
Do
Loop Until Done <> 0
Exit Sub
End Sub
Private Sub RunThis()
uh = 1
Call RunDelay ' 1 second delay
uh = 2
End Sub
Private Sub Timer1_Timer()
Done = Done + 1
Timer1.Enabled = False
End Sub
<>
reply
Delay Timer
The delay you created is not running because you do it when the form load into the
memory. When the timer1.enabled=true , the command is not working , so the
"done" variable is still 0. Then the computer still doing the loop till it get bug.
reply
Thanks ++ Question
Hello!
I am writing a program that runs three forms at a time. Each of the three forms has three
timers of which, any two are running at a time. When I turn on the timers on the second
and third forms, the timers on the first form stop functioning. Whats up with this?? I have
done this before and it has always worked. Does anyone have a clue what could be
going wrong?
Thanks,
Huff
reply
module
hey!!!...
someone can tell to me what is the proper way to declare in module??.... and what is the
easier way to declare??...
email me at: dinzkie006@yahoo.com
reply
timer
user use the computer and he/she log in the time when he/she start and compute the No.
of hours after he/she use the computer...
i hope you answer my question. i need it on my project..
Thanks!!
reply
timer1.interval = 1000
'the rest you want to add on then button
end sub
'On Log Out
private sub cmdLogOut_clicked()
rsLoged.movelast
rsLoged.addnew
reLoged.fields(0) = myLogin 'this is the variable you declare on the login button
reLoged.fields(1) = time 'this is the system time
reLoged.fields(2) = lblTimer 'this is a label contaning the Time Consumed
rsLoged.Update
end sub
----------------------------------'time consumed is the set apart by Hours, Minutes and Seconds
declaring HH, MM, SS as integer will do.
and HO, MO, SO as string
on a timer1
private sub timer1_timer()
SS = SS + 1
With lblTimer
If SS >= 10 Then
SO = "" & SS
End If
If MM >= 10 Then
MO = "" & MM
End If
If HH >= 10 Then
HO = "" & HH
End If
.Caption = HO & ":" & MO '& ":" & SO this is invisible.
End With
end sub
'this is working for me, this will not compute for the interval of the Log in and Log out
but
'lets say it does cause it display the time consumed from the time you Log In
'i.e. Login:1:00pm; Logout:2:25; Consumed:1:25;
end sub
------------------------------now for viewing the record-------------on a new form
add a datagrid view on the form 'get it on the components
private sub form2_load()
Dim SQLTimeOut As String
SQLTimeOut = "select * from LOGED"
rsLoged.open SQLTimeOut, myTimeOutCon, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = rsData
end sub
'thats all: HOPE this is HELPUL to you
(^_^),\m/
reply
I Forgot to..
Timer
tutorials
I just wanted to thank you for your tutorials I am a mature student trying to learn vb . I get
2 hours tuition per week.
The jargon used in books and some other tutorials make it very difficult to advance
therefore simply explained procedures are much appreciated
Thank you for your efforts
reply
my question is....
if you need help with code send it to me and tell me what you want...i will fix it and
highlight all changes....happy coding...
reply
payroll
i need help on a timer with a label displaying the time 30 sec's counting down to 0
need help badly
reply
IT Works... Thanks To
Previous Writer....
countdown timer
suppose i have 3 shapes as 1,2,3. these are coded in such a way with 3timers that firstly
1 is visible & others are not & after interval 1000, it bcomes invisible & 2 is now visible.
similarly this process repeats for 3 & again back for 1. if i want to enable another timer4
with a click of a command button when 1 is visible or timer5 when 2 is visible or timer6
when 3 is visible , then what code should i write on the click event of command button.
reply
You would simply use an if statement to see what shape is visible and then set the
correct timer to enabled as a result. Put this code in the Command button click
event:
' Disable all timers and then enable the appropriate one
timer4.enabled = false
timer5.enabled = false
timer6.enabled = false
if shape1.visible = true then
timer4.enabled = true
elseif shape2.visible = true then
timer5.enabled = true
elseif shape3.visible = true then
timer6.enabled = true
This should get you running. As you get it working would you please consider
writing a quick tutorial teaching some of what you've learned. You can write it in
Word or even as a text file and submit it through our Add Your Tutorial page. I think
others would benefit from everything your learning and its always cool to get
something published!
reply
help me plz
im a student from the philippines. i cant figure out how can i do this scenario, i
have 1 label box but it can change its content by means of timer?? i cant do it..
can u help me....
1 label box
controlled by a timer
Please!!! Help!!!
i need three timers working together. We're working on a timed-traffic-light project. The
traffic lights (red, yellow and green) need to blink alternately (ex: red glows red then after
interval yellow glows yellow then another interval and green flashes).
Do you know how?
Thanks anyways....
reply
hey guys i have problem i want to make game with shape and i dont know how to
put timer in. can u help me??
reply
Private Sub
End Sub
Where dSecond & dMinute are Private Integers in General Declarations. I set
dMinute to the value 10 and dSecond to 0 in Form_Load.
reply
I suggest a simple method to make a start-stop watch : Take the first exemple of this
toturial, look at for the variable mintCount:
at line mintCount = mintCount + 1
we rewrite : " mintCount = mintCount + tmrTest.Interval" .
Make a Textbox on the main Form (for exemple : with the name txtTime).
Then, the text of this Textbox will be set : txtTime.Text =
FormatNumeric(mintCount/1000,2)
'Format a numeric number with 2 numbers after '.'
'That give us : second.milisecond
But this solution has a problem: If we choose a small value of Interval of Timer (for ex:
100, 200), the elapsed time is displayed on the TextBox is incorrect because the
program takes a few moment to execute the syntax.
However, if we use a higher Interval value (for ex : 500), we can avoid this problem.
reply
Countdown?!
can anyone help me with getting the timer start stop nd reset.....as we do exactly with an
start stop watch????
reply
another example
i wish to know how to make an actuall timer, for a game... for example... the user is being
timed as to their efficiency in doing a test... (15 questions)...
i understand that i'll need 2 timers and a lable which desplays the time going up and
starting from 0 minuts... can u post something like that up?? thanks
reply
The content of this field is kept private and will not be shown publicly.
Homepage:
Subject:
Comment: *
Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
Lines and paragraphs break automatically.
You can enable syntax highlighting of source code with the following tags: <code>,
<blockcode>. The supported tag styles are: <foo>, [foo].
Preview
Unless otherwise noted, all content on this site and in the source samples is Copyrighted
2011 by the owner of vb6.us. All rights reserved - Contact Information