473,383 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Timer1 problem.

Hi

I have a problem getting code to perform under the timer.

My program reads data from a sequential file and performs analysis on this
data. Depending on the criteria selected this program could take up to 4
hours to process. I want to set up a timer which displays the the progress
of the program at 1 second intervals. (I can write this code).

I can get the timer to work, but not while the program is running the code.
It seems as if the processing of the data is taking up all of the resources
and not allowing the code in the timer function to be displayed.

Is there a way to halt the other processing for say 100th of a second while
the code in the timer function can be displayed.

Thanks
Trevor.
Jul 17 '05 #1
5 2344
Maybe addding the statement

DoEvents

in the procedure that processes the file would do the trick

"The Roys" <tr*****@hotmail.com> wrote in message
news:dM********************@news-server.bigpond.net.au...
Hi

I have a problem getting code to perform under the timer.

My program reads data from a sequential file and performs analysis on this
data. Depending on the criteria selected this program could take up to 4
hours to process. I want to set up a timer which displays the the progress
of the program at 1 second intervals. (I can write this code).

I can get the timer to work, but not while the program is running the code. It seems as if the processing of the data is taking up all of the resources and not allowing the code in the timer function to be displayed.

Is there a way to halt the other processing for say 100th of a second while the code in the timer function can be displayed.

Thanks
Trevor.

Jul 17 '05 #2
On Thu, 16 Oct 2003 05:11:37 GMT, "The Roys" <tr*****@hotmail.com>
wrote:
Hi

I have a problem getting code to perform under the timer.

My program reads data from a sequential file and performs analysis on this
data. Depending on the criteria selected this program could take up to 4
hours to process. I want to set up a timer which displays the the progress
of the program at 1 second intervals. (I can write this code).

I can get the timer to work, but not while the program is running the code.
It seems as if the processing of the data is taking up all of the resources
and not allowing the code in the timer function to be displayed.

Is there a way to halt the other processing for say 100th of a second while
the code in the timer function can be displayed.


You really need to put the odd DoEvents in your 'tight processing'
loop

The side effect is that you could get someone clicking on something
and setting off another 'strand of execution' whikl the first one is
running.
Jul 17 '05 #3
As mentioned, use the doevents BUT prior to the execution you should disable
the form, controls etc and re-enable them at the end.

Doevents will also prevent Windows from claiming that your program "... is
not responding" and threatening to end it violently.. :-)

A.

"The Roys" <tr*****@hotmail.com> wrote in message
news:dM********************@news-server.bigpond.net.au...
Hi

I have a problem getting code to perform under the timer.

My program reads data from a sequential file and performs analysis on this
data. Depending on the criteria selected this program could take up to 4
hours to process. I want to set up a timer which displays the the progress
of the program at 1 second intervals. (I can write this code).

I can get the timer to work, but not while the program is running the code. It seems as if the processing of the data is taking up all of the resources and not allowing the code in the timer function to be displayed.

Is there a way to halt the other processing for say 100th of a second while the code in the timer function can be displayed.

Thanks
Trevor.

Jul 17 '05 #4
On Fri, 17 Oct 2003 08:57:47 +0300, "Aristotelis E. Charalampakis"
<ar***********************@REMOVEMEhotmail.com> wrote:
As mentioned, use the doevents BUT prior to the execution you should disable
the form, controls etc and re-enable them at the end.

Doevents will also prevent Windows from claiming that your program "... is
not responding" and threatening to end it violently.. :-)


Good advice,

However I would stick all the controls in the Form inside a Frame

.... And disable the Frame
Jul 17 '05 #5
of course, but remember the toolbar as well!

Cheers

A

"J French" <er*****@nowhere.com> wrote in message
news:3f***************@news.btclick.com...
On Fri, 17 Oct 2003 08:57:47 +0300, "Aristotelis E. Charalampakis"
<ar***********************@REMOVEMEhotmail.com> wrote:
As mentioned, use the doevents BUT prior to the execution you should disablethe form, controls etc and re-enable them at the end.

Doevents will also prevent Windows from claiming that your program "... isnot responding" and threatening to end it violently.. :-)


Good advice,

However I would stick all the controls in the Form inside a Frame

... And disable the Frame

Jul 17 '05 #6

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

Similar topics

0
by: Bruce Davis | last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded tkinter gui application. The problem appears to be a deadlock condition when a child thread pops up a Pmw dialog window in...
11
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
0
by: Refky Wahib | last post by:
Hi I need Technical Support I finished a Great project using .Net and SQL Server and .Net Mobile Control My Business case is to implement this Program to accept about 1 Million concurrent...
117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
3
by: cj | last post by:
This program is used to send files to an ftp server at 2:00am each day. At the very top of my program I dim a new instance of a com FTP control. I have a processing sub which calls a login function...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.