473,782 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stop watch using vb.net

how can i create a stop watch using vb.net
i am performing a data extraction job using windows forms and want to
display time elapsed on the form. how can i do it?

Thanks
Oct 4 '05 #1
2 5580
There is a good implementation ofa stopwatch class in C# availabel here

http://www.cambiaresearch.com/cambia...StopWatch.aspx

and a C# to Vb.Net converter here:

http://www.developerfusion.co.uk/uti...sharptovb.aspx

HTH

Ollie Riches

"Job Lot" <Jo****@discuss ions.microsoft. com> wrote in message
news:ED******** *************** ***********@mic rosoft.com...
how can i create a stop watch using vb.net
i am performing a data extraction job using windows forms and want to
display time elapsed on the form. how can i do it?

Thanks

Oct 4 '05 #2
Job,

The most easiest method is probably, typed in this message so watch typos or
whatever.

\\\
sub Button_Click_ev ent
static started as boolean
static mystart as integer
if started = false then
mystart = environment.tic kcount
started = true
else
messagebox.show ((environment.t ickcount - started).ToStri ng)
started = false
end if
end sub
///

Did you know that there is a special vbnet language newsgroup

microsoft.publi c.dotnet.langua ges.vb

I hope this helps,

Cor

"Job Lot" <Jo****@discuss ions.microsoft. com> schreef in bericht
news:ED******** *************** ***********@mic rosoft.com...
how can i create a stop watch using vb.net
i am performing a data extraction job using windows forms and want to
display time elapsed on the form. how can i do it?

Thanks

Oct 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3523
by: Matt Theule | last post by:
While stepping through an ASP.NET project, I found that data was being inserted into my database even though I was not stepping through the code that inserted the data. I have a single page with inline code. The page has a Datagrid, a textbox and a button. When the button is clicked, the value of the textbox is inserted into the table whose contents are displayed on the page. The problem occurs when I set a breakpoint on a line *IN*...
7
2177
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. Here's what I discovered. In addition to my main web project and several middle tier projects, I also added an "empty" web project in my solution (Add - New Project - Empty Web Project). This empty web project is what is causing the above...
2
2171
by: Enrique Bustamante | last post by:
Casting arrays that works on watch and command window but not in code. My application is casting arrays in a way it should work. To test if I was doing something invalid, I wrote a test code that has similar structure of the classes in my application. The test worked fine, the casting I want to do must work. I compared the structure of the test with the application to ensure they where similar (inheriting twice, base class implements...
6
3334
by: Xero | last post by:
Hi. I have created a 'stop watch' program. The working principle of the program is to declare an integer (say 'intTime'), which is initalized to zero. Once the user clicks the 'Start' button, the Timer component (the one found at System.Windows.Forms.Timer) starts ticking (with this code: Timer.Enabled = True). Whenever the timer ticks, 'intTime' is inclemented by 1 and this updated number is displayed on the form. The interval of the...
2
328
by: Job Lot | last post by:
how can i create a stop watch using vb.net i am performing a data extraction job using windows forms and want to display time elapsed on the form. how can i do it? Thanks
6
15742
by: M Craig | last post by:
I'm trying to write a custom installation engine to plug into our existing build system. Some things I'm trying to do are, Create/Delete/Start/Stop Application Pools, Web Sites, and Virtual Directories. At this point I'd be happy if someone can provide a sample of how to Stop an application pool. Or point me in the right direction. Thanks!
4
2095
by: Rajneesh Chellapilla | last post by:
I wrote this program. Its kinda of strange when I make a reset function reset(){c=0} its doest reset the setTimeout. However if I directly pass c=0 to the onclick button it does reset the timer. What is the logic of this? Here is the program: <html> <head> <script type="text/javascript"> var c=0; var t; function timedCount()
3
2709
by: GiJeet | last post by:
I put the the button property in the watch window but it doesn't stop when the property changes value. For example I put this.myButton.Visible in the watch window with an initial value of false and I want program execution to stop when the Visible property changes to true. how to accomplish this? TIA G
11
3744
by: uzairmemon | last post by:
Any one Have coding of Reverse stop watch?
0
10311
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9942
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8967
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6733
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2874
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.