Stopwatch
I want project code for stopwatch...any good example plz
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hiren SoniRank #694 · 3.5K reputationPosted Jan 30, 2010, 6:49 PM EST
public partial class Form1 : Form
{
Stopwatch s;
Timer t1;
public Form1()
{
t1 = new Timer(); ;
s = new Stopwatch();
t1.Tick += new EventHandler(tick);
InitializeComponent();
s.Reset();
t1.Start();
}
private void button1_Click(object sender, EventArgs e)
{
s.Stop();
}
public void tick(object sender, EventArgs e)
{
textBox1.Text = s.Elapsed.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
s.Reset();
listBox1.Items.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
s.Start();
}
private void button4_Click(object sender, EventArgs e)
{
listBox1.Items.Add(s.Elapsed.ToString());
}
}
Lalit MRank #1,186 · 1.5K reputationPosted Jan 29, 2010, 7:07 PM EST
In JavaScript
-------------
http://www.java-scripts.net/javascripts/Stop-Watch-Script.phtml
In VB.NET
-------------
http://www.devasp.net/net/articles/display/335.html
http://www.mentalis.org/soft/class.qpx?id=8
http://www.experts-exchange.com/Programming/Languages/.NET/Q_20468088.html
In C#
------
http://www.c-sharpcorner.com/UploadFile/aaghany/StopWatchUsingCsharp11122005051620AM/StopWatchUsingCsharp.aspx
http://www.dotnetspider.com/resources/30931-Stopwatch.aspx
Hiren SoniRank #694 · 3.5K reputationPosted Jan 30, 2010, 7:09 PM EST
reset and start mthod of stopwatch ..into the interval's button clik.
dont forget to accept answer
paul daniel189 reputationPosted Feb 1, 2010, 8:38 PM EST
http://dotnetperls.com/stopwatch