473,785 Members | 2,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display timer continuously through a long process

I am using a timer to display the time it takes a user to complete a
file transfer using the code below.
The code below will display the total elapsed time, but is there a way
to update the time continuously as the file is being downloaded?
Help is greatly appreciated,
lq

Public sngStart as Single
Public sngEnd as Single
Public sngElapsed as Single

Function CopyTheFrigginF ile()

sngStart = Timer
Call FunctionThatSta rtsDownloadingT heBeast
sngEnd = Timer
sngElapsed = Format(sngEnd - sngStart,"Fixed ")
Me.TimerDisplay = sngElapsed & " seconds"
End Function

Nov 13 '05 #1
6 4499
Lauren,
The syscmd object will let you put your own message in the Status bar. If
you use the Timer event of a form and set the Timer interval to ?1000? then
you can update the Status bar each second with the elapsed time.

"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I am using a timer to display the time it takes a user to complete a
file transfer using the code below.
The code below will display the total elapsed time, but is there a way
to update the time continuously as the file is being downloaded?
Help is greatly appreciated,
lq

Public sngStart as Single
Public sngEnd as Single
Public sngElapsed as Single

Function CopyTheFrigginF ile()

sngStart = Timer
Call FunctionThatSta rtsDownloadingT heBeast
sngEnd = Timer
sngElapsed = Format(sngEnd - sngStart,"Fixed ")
Me.TimerDisplay = sngElapsed & " seconds"
End Function

Nov 13 '05 #2
On Fri, 25 Mar 2005 18:36:27 -0500, "Alan Webb" <kn*****@hotmai l.com>
wrote:

But only if FunctionThatSta rtsDownloadingT heBeast yields the CPU.
-Tom.

Lauren,
The syscmd object will let you put your own message in the Status bar. If
you use the Timer event of a form and set the Timer interval to ?1000? then
you can update the Status bar each second with the elapsed time.

"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11******* *************** @z14g2000cwz.go oglegroups.com. ..
I am using a timer to display the time it takes a user to complete a
file transfer using the code below.
The code below will display the total elapsed time, but is there a way
to update the time continuously as the file is being downloaded?
Help is greatly appreciated,
lq

Public sngStart as Single
Public sngEnd as Single
Public sngElapsed as Single

Function CopyTheFrigginF ile()

sngStart = Timer
Call FunctionThatSta rtsDownloadingT heBeast
sngEnd = Timer
sngElapsed = Format(sngEnd - sngStart,"Fixed ")
Me.TimerDisplay = sngElapsed & " seconds"
End Function


Nov 13 '05 #3
Tom van Stiphout wrote:
On Fri, 25 Mar 2005 18:36:27 -0500, "Alan Webb" <kn*****@hotmai l.com>
wrote:

But only if FunctionThatSta rtsDownloadingT heBeast yields the CPU.
-Tom.


I suspect even with judicious use of the DoEvents command that you won't
get a "very smooth" time display.

--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #4
On Fri, 25 Mar 2005 21:30:08 -0600, John Mishefske
<mi************ @JUNKtds.net> wrote:

Agreed. WM_TIMER events are lowest priority. Everything else is done
first; then the timer is updated (= the form_timer event fires).
I remember that I used to find this very strange when I first started
programming for Windows, but once I saw the multi-media timer that
*can* tick in a more reliable fashion, and what is needed to make that
happen, it made a lot of sense. "Stop everything; I need to update the
clock" doesn't make much sense in most applications.

-Tom.

Tom van Stiphout wrote:
On Fri, 25 Mar 2005 18:36:27 -0500, "Alan Webb" <kn*****@hotmai l.com>
wrote:

But only if FunctionThatSta rtsDownloadingT heBeast yields the CPU.
-Tom.


I suspect even with judicious use of the DoEvents command that you won't
get a "very smooth" time display.


Nov 13 '05 #5
Guys,
Uhm, even on my P166 Hitachi Visionbook I was able to write things that
yielded the CPU and updated the status bar. The particular task was a 20
minute run to iterate through a four column, million plus row table stored
on my desktop machine and do a data conversion. With processors running
faster than 3Ghz and 1GB of RAM not such an unusual thing these days I'd
expect to see a monster task freezing the CPU. Plus, Windows XP seems much
better about multitasking than Windows 98. Anyway, syscmd should work.

"Tom van Stiphout" <no************ *@cox.net> wrote in message
news:v6******** *************** *********@4ax.c om...
On Fri, 25 Mar 2005 18:36:27 -0500, "Alan Webb" <kn*****@hotmai l.com>
wrote:

But only if FunctionThatSta rtsDownloadingT heBeast yields the CPU.
-Tom.

Lauren,
The syscmd object will let you put your own message in the Status bar. If
you use the Timer event of a form and set the Timer interval to ?1000?
then
you can update the Status bar each second with the elapsed time.

"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11****** *************** *@z14g2000cwz.g ooglegroups.com ...
I am using a timer to display the time it takes a user to complete a
file transfer using the code below.
The code below will display the total elapsed time, but is there a way
to update the time continuously as the file is being downloaded?
Help is greatly appreciated,
lq

Public sngStart as Single
Public sngEnd as Single
Public sngElapsed as Single

Function CopyTheFrigginF ile()

sngStart = Timer
Call FunctionThatSta rtsDownloadingT heBeast
sngEnd = Timer
sngElapsed = Format(sngEnd - sngStart,"Fixed ")
Me.TimerDisplay = sngElapsed & " seconds"
End Function

Nov 13 '05 #6
Alan,
Thanks for the reply. I have to do this without using the Status bar
because I don't show it in this application (nor the Access window.)
And putting code in the form's OnTimer doesn't work because the CPU
doesn't yield during the FileCopy.
lq
Alan Webb wrote:
Lauren,
The syscmd object will let you put your own message in the Status bar. If you use the Timer event of a form and set the Timer interval to ?1000? then you can update the Status bar each second with the elapsed time.

"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I am using a timer to display the time it takes a user to complete a
file transfer using the code below.
The code below will display the total elapsed time, but is there a way to update the time continuously as the file is being downloaded?
Help is greatly appreciated,
lq

Public sngStart as Single
Public sngEnd as Single
Public sngElapsed as Single

Function CopyTheFrigginF ile()

sngStart = Timer
Call FunctionThatSta rtsDownloadingT heBeast
sngEnd = Timer
sngElapsed = Format(sngEnd - sngStart,"Fixed ")
Me.TimerDisplay = sngElapsed & " seconds"
End Function


Nov 13 '05 #7

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

Similar topics

2
7042
by: laurenq uantrell | last post by:
I have been using the following function to test the speed of various functions, however, quite often the return value is zero. I'm hoping someone can help improve on this. Function TimeIt() As Single On Error GoTo CodeErr 'PURPOSE: Times a process in seconds from start to finish 'USAGE: msgbox TimeIt Dim sngStart As Single
1
3733
by: Mamatha | last post by:
Hi I am developing a small application to capture a record a video file through webcam in C#.NET. In this application i created a JPEG images for every slide,means every JPEG image was treated as a slide then i want to display these images as a slide show. How can i alot time teo each frame? How can i display images one by one without my interaction? Please give me the solution or any releated source code.
1
2707
by: karanam ravi kiran via DotNetMonster.com | last post by:
hi friends, i am fresher in the world of .net, i have problem to display time in asp.net web continuously. i want to display time on the form like the "live timer on windows task bar" plz help me over this thing thank you ".net Monster" --
10
1662
by: Bob | last post by:
Okay, I've done this for years but now I'm going to question it just because this idea has been at the back of my head since I started using DotNet... My WinForms app queries a database every 60 seconds. I set up a singleton class that's instantiated when the app starts, and that starts a timer. My question is, would it be better to run this checking process on a separate thread and have it use its own DB connection? If there isn't a...
1
6025
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the browser back button, it loads the progress bar again. Any solution to this?
3
1419
by: archana | last post by:
Hi all I am having application which is using server based timer that is timer from namespace system.timer. I am having windows service which i want to run everyday at some fix time. In service.cs class i am creating one worker thread and in thread procedure i am enabling one timer after thread procedure is completed and in timer's elapsed event i am recalling my function of actual processing.
4
11132
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts the default of True. The Elapsed event handler updates the dialog box with how long before it will close, acting as a timer itself. The dialog has a time to close property which is checked every time the Elapsed event fires. The problem I have...
6
1909
by: Aspiring .NET Programmer | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows service which writes into a log file periodically (text file). I want to create a windows form application, which, upon invocation should continuously display the contents of the log file.
4
7035
by: Max | last post by:
This may be an elementary question but it's something I have not encountered in about 10 years writing code in VB 5 / 6 I have a timer that using the API checks if there has been a change to one of several watched directories in the file system, if there has been a change a rather long running process is started. The long running process loops through all files comparing the last modified attributes on each to those in the database if...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10151
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...
0
9950
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
8973
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...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
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
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
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
2879
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.