SlideShare a Scribd company logo
Timer Control
By: NYASA TYAGI
04090302014
BCA-III(NS)
What is Timer Control ?
 By using this Timer Control, windows allow you to control
when actions take place without the interaction of another
thread.
Use of Timer Control
 If you want to run some code after a certain interval of time continuously, you can
use the Timer control.
 As well as to start a process at a fixed time schedule, to increase or decrease the
speed in an animation graphics with time schedule etc.
 The Visual Studio toolbox has a Timer Control that allowing you to drag and drop
the timer controls directly onto a Windows Forms designer.
How to Timer Control ?
TIMER PROPERTY
 For example, if we want to set an interval of one
minute we set the value at Interval property as
60000, means 60x1000 .
 The Timer Control starts its functioning only after
its Enabled property is set to True, by default
Enabled property is False.
Timer example
 The following program shows a Timer example that display current system time in a
Label control.
 For doing this, we need one Label control and a Timer Control.
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Label1.Text = DateTime.Now.ToString
End Sub
End Class
Start and Stop Timer Control
 We can control the Timer Control Object that when it start its function as well as
when it stop its function.
 The Timer Control has a start and stop methods to perform these actions.
Start and Stop Timer Control
 Here is an example for start and stop methods of the Timer Control. In this example
we run this program only 10 seconds.
Public Class Form1
Dim second As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Timer1.Interval = 1000
Timer1.Start() 'Timer starts functioning
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Label1.Text = DateTime.Now.ToString
second = second + 1
If second >= 10 Then
Timer1.Stop() 'Timer stops functioning
MsgBox("Timer Stopped....")
End If
End Sub
End Class
THANK YOU

More Related Content

What's hot

Sequence Diagram
Sequence DiagramSequence Diagram
HTML Tables
HTML TablesHTML Tables
HTML Tables
Nisa Soomro
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
Hamid Ghorbani
 
Tableau groups vs sets
Tableau groups vs setsTableau groups vs sets
Tableau groups vs sets
Vizual Intelligence Consulting
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread SynchronizationBenj Del Mundo
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
barney92
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
Snehal Harawande
 
Java Swing
Java SwingJava Swing
Java Swing
Arkadeep Dey
 
Building blocks of android
Building blocks of androidBuilding blocks of android
Building blocks of android
Siddhesh Palkar
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
DrSonali Vyas
 
Android UI
Android UIAndroid UI
Android UI
nationalmobileapps
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
Malek Sumaiya
 
vb.net Constructor and destructor
vb.net Constructor and destructorvb.net Constructor and destructor
vb.net Constructor and destructor
suraj pandey
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
Anjan Mahanta
 

What's hot (20)

Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
 
Crystal report
Crystal reportCrystal report
Crystal report
 
Tableau groups vs sets
Tableau groups vs setsTableau groups vs sets
Tableau groups vs sets
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread Synchronization
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
 
Java Swing
Java SwingJava Swing
Java Swing
 
GRID VIEW PPT
GRID VIEW PPTGRID VIEW PPT
GRID VIEW PPT
 
android menus
android menusandroid menus
android menus
 
Building blocks of android
Building blocks of androidBuilding blocks of android
Building blocks of android
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Html Frames
Html FramesHtml Frames
Html Frames
 
Android Services
Android ServicesAndroid Services
Android Services
 
Android UI
Android UIAndroid UI
Android UI
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
vb.net Constructor and destructor
vb.net Constructor and destructorvb.net Constructor and destructor
vb.net Constructor and destructor
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
 

Viewers also liked

Yr Muhammad c.v (1) (1) - Copy
Yr Muhammad c.v (1) (1) - CopyYr Muhammad c.v (1) (1) - Copy
Yr Muhammad c.v (1) (1) - Copyyar muhammad
 
Visual Basic 6 Data Base
Visual Basic 6 Data BaseVisual Basic 6 Data Base
Visual Basic 6 Data Base
Spy Seat
 
Timer control and Tool Strip C#
Timer control and Tool Strip C# Timer control and Tool Strip C#
Timer control and Tool Strip C#
JJ Javier
 
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONSVISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
Suraj Kumar
 
ADO CONTROLS - Database usage
ADO CONTROLS - Database usageADO CONTROLS - Database usage
ADO CONTROLS - Database usage
Muralidharan Radhakrishnan
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
Muralidharan Radhakrishnan
 
Windows.forms.ejercicios
Windows.forms.ejerciciosWindows.forms.ejercicios
Windows.forms.ejercicios
CHRISTIAN ASENCIO
 
Final inpage book learn inpage in urdu
Final inpage book   learn inpage in urduFinal inpage book   learn inpage in urdu
Final inpage book learn inpage in urdu
Raheel Khan
 
Inpage- Urdu Application software
Inpage- Urdu Application softwareInpage- Urdu Application software
Inpage- Urdu Application software
Adan Butt
 

Viewers also liked (12)

Yr Muhammad c.v (1) (1) - Copy
Yr Muhammad c.v (1) (1) - CopyYr Muhammad c.v (1) (1) - Copy
Yr Muhammad c.v (1) (1) - Copy
 
Visual Basic 6 Data Base
Visual Basic 6 Data BaseVisual Basic 6 Data Base
Visual Basic 6 Data Base
 
Inpage
InpageInpage
Inpage
 
Timer control and Tool Strip C#
Timer control and Tool Strip C# Timer control and Tool Strip C#
Timer control and Tool Strip C#
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONSVISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
 
ADO CONTROLS - Database usage
ADO CONTROLS - Database usageADO CONTROLS - Database usage
ADO CONTROLS - Database usage
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
 
Windows.forms.ejercicios
Windows.forms.ejerciciosWindows.forms.ejercicios
Windows.forms.ejercicios
 
Final inpage book learn inpage in urdu
Final inpage book   learn inpage in urduFinal inpage book   learn inpage in urdu
Final inpage book learn inpage in urdu
 
Inpage- Urdu Application software
Inpage- Urdu Application softwareInpage- Urdu Application software
Inpage- Urdu Application software
 
Visual basic 6
Visual basic 6Visual basic 6
Visual basic 6
 

Similar to Timer control

The timer use
The timer useThe timer use
Introduction of timer control
Introduction of timer controlIntroduction of timer control
Introduction of timer control
chauhankapil
 
How to Create a Countdown Timer in Python.pdf
How to Create a Countdown Timer in Python.pdfHow to Create a Countdown Timer in Python.pdf
How to Create a Countdown Timer in Python.pdf
abhishekdf3
 
Free rtos workshop3@nuu
Free rtos workshop3@nuuFree rtos workshop3@nuu
Free rtos workshop3@nuu
紀榮 陳
 
Session13 J2ME Timer
Session13  J2ME TimerSession13  J2ME Timer
Session13 J2ME Timer
muthusvm
 
WinAutomation Features
WinAutomation FeaturesWinAutomation Features
WinAutomation Features
Automation Edge
 
Learning Robotic Process Automation-81-167
Learning Robotic Process Automation-81-167Learning Robotic Process Automation-81-167
Learning Robotic Process Automation-81-167
Nicolas Benjamin Cruz Carpio
 
Timer Interceptor in Mule part 2
Timer Interceptor in Mule part 2Timer Interceptor in Mule part 2
Timer Interceptor in Mule part 2
Anirban Sen Chowdhary
 
One function ( Timer ) in SecuoNEO Project
One function ( Timer ) in SecuoNEO ProjectOne function ( Timer ) in SecuoNEO Project
One function ( Timer ) in SecuoNEO Project
Nay Oo Kyaw
 
Real time-embedded-system-lec-03
Real time-embedded-system-lec-03Real time-embedded-system-lec-03
Real time-embedded-system-lec-03
University of Computer Science and Technology
 
Foundations and methods of stochastic simulation
Foundations and methods of stochastic simulationFoundations and methods of stochastic simulation
Foundations and methods of stochastic simulationSpringer
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examplesmedsherb
 
Trigger
TriggerTrigger
Workshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWSWorkshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWS
Amazon Web Services
 
Engineering slides venay magen
Engineering slides   venay magenEngineering slides   venay magen
Engineering slides venay magen
venaymagen19
 
JMeter Pre Processors 2
JMeter Pre Processors 2JMeter Pre Processors 2
JMeter Pre Processors 2
Loadium
 

Similar to Timer control (20)

The timer use
The timer useThe timer use
The timer use
 
Introduction of timer control
Introduction of timer controlIntroduction of timer control
Introduction of timer control
 
How to Create a Countdown Timer in Python.pdf
How to Create a Countdown Timer in Python.pdfHow to Create a Countdown Timer in Python.pdf
How to Create a Countdown Timer in Python.pdf
 
Free rtos workshop3@nuu
Free rtos workshop3@nuuFree rtos workshop3@nuu
Free rtos workshop3@nuu
 
Session13 J2ME Timer
Session13  J2ME TimerSession13  J2ME Timer
Session13 J2ME Timer
 
WinAutomation Features
WinAutomation FeaturesWinAutomation Features
WinAutomation Features
 
Learning Robotic Process Automation-81-167
Learning Robotic Process Automation-81-167Learning Robotic Process Automation-81-167
Learning Robotic Process Automation-81-167
 
Timer Interceptor in Mule part 2
Timer Interceptor in Mule part 2Timer Interceptor in Mule part 2
Timer Interceptor in Mule part 2
 
The Timer
The TimerThe Timer
The Timer
 
One function ( Timer ) in SecuoNEO Project
One function ( Timer ) in SecuoNEO ProjectOne function ( Timer ) in SecuoNEO Project
One function ( Timer ) in SecuoNEO Project
 
Real time-embedded-system-lec-03
Real time-embedded-system-lec-03Real time-embedded-system-lec-03
Real time-embedded-system-lec-03
 
Foundations and methods of stochastic simulation
Foundations and methods of stochastic simulationFoundations and methods of stochastic simulation
Foundations and methods of stochastic simulation
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examples
 
Trigger
TriggerTrigger
Trigger
 
Workshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWSWorkshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWS
 
I os 06
I os 06I os 06
I os 06
 
Engineering slides venay magen
Engineering slides   venay magenEngineering slides   venay magen
Engineering slides venay magen
 
Responsive interfaces
Responsive interfacesResponsive interfaces
Responsive interfaces
 
JMeter Pre Processors 2
JMeter Pre Processors 2JMeter Pre Processors 2
JMeter Pre Processors 2
 
TM1 Monitoring Tools
TM1 Monitoring ToolsTM1 Monitoring Tools
TM1 Monitoring Tools
 

Recently uploaded

May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 

Recently uploaded (20)

May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 

Timer control

  • 1. Timer Control By: NYASA TYAGI 04090302014 BCA-III(NS)
  • 2. What is Timer Control ?  By using this Timer Control, windows allow you to control when actions take place without the interaction of another thread.
  • 3. Use of Timer Control  If you want to run some code after a certain interval of time continuously, you can use the Timer control.  As well as to start a process at a fixed time schedule, to increase or decrease the speed in an animation graphics with time schedule etc.  The Visual Studio toolbox has a Timer Control that allowing you to drag and drop the timer controls directly onto a Windows Forms designer.
  • 4. How to Timer Control ? TIMER PROPERTY  For example, if we want to set an interval of one minute we set the value at Interval property as 60000, means 60x1000 .  The Timer Control starts its functioning only after its Enabled property is set to True, by default Enabled property is False.
  • 5. Timer example  The following program shows a Timer example that display current system time in a Label control.  For doing this, we need one Label control and a Timer Control. Public Class Form1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = DateTime.Now.ToString End Sub End Class
  • 6. Start and Stop Timer Control  We can control the Timer Control Object that when it start its function as well as when it stop its function.  The Timer Control has a start and stop methods to perform these actions.
  • 7. Start and Stop Timer Control  Here is an example for start and stop methods of the Timer Control. In this example we run this program only 10 seconds. Public Class Form1 Dim second As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 1000 Timer1.Start() 'Timer starts functioning End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = DateTime.Now.ToString second = second + 1 If second >= 10 Then Timer1.Stop() 'Timer stops functioning MsgBox("Timer Stopped....") End If End Sub End Class