473,320 Members | 1,945 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,320 software developers and data experts.

Timer and refreshing the UI

I'm trying to set a timer that gets called every 3 seconds so I can update a
field in the UI with the time elapsed since the process started.

What am I doing wrong that timerDF_Tick does not get called?

private System.Windows.Forms.Timer timerDF;
this.timerDF = new System.Windows.Forms.Timer(this.components);

this.timerDF.Interval = 3000;
this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);

timerDF.Enabled = true;
timerDF.Start();
// here I call a stored procedure that takes about 10 minutes to run
......

private void timerDF_Tick(object sender, System.EventArgs e)
{
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2 - dt1 ;

textProcessTime.Text = string.Format( "{0}:{1}:{2}",
diff.Hours.ToString("00"),
diff.Minutes.ToString("00"),
diff.Seconds.ToString("00") );

textProcessTime.Update();

this.Update();
}
Nov 16 '05 #1
8 2749
Where are you putting the this.timerDF.Tick += new
System.EventHandler(this.timerDF_Tick) statement? I would put it in your
Load event, or somewhere near the init of the win form.

But, It doesn't look like you are doing anything wrong (although I would use
System.Timers.Timer as opposed to System.Windows.Forms.Timer). Also, you
shouldn't need to call textProcessTime.Update() or this.Update().

Have you tried placing a breakpoint in the timerDF_Tick event to see if it
is not firing?

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Daniel P." <da******@hotmail.comU> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
| I'm trying to set a timer that gets called every 3 seconds so I can update
a
| field in the UI with the time elapsed since the process started.
|
| What am I doing wrong that timerDF_Tick does not get called?
|
|
|
| private System.Windows.Forms.Timer timerDF;
| this.timerDF = new System.Windows.Forms.Timer(this.components);
|
| this.timerDF.Interval = 3000;
| this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);
|
| timerDF.Enabled = true;
| timerDF.Start();
|
|
| // here I call a stored procedure that takes about 10 minutes to run
| .....
|
| private void timerDF_Tick(object sender, System.EventArgs e)
| {
| DateTime dt2 = DateTime.Now;
| TimeSpan diff = dt2 - dt1 ;
|
| textProcessTime.Text = string.Format( "{0}:{1}:{2}",
| diff.Hours.ToString("00"),
| diff.Minutes.ToString("00"),
| diff.Seconds.ToString("00") );
|
| textProcessTime.Update();
|
| this.Update();
| }
|
|
Nov 16 '05 #2

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Where are you putting the this.timerDF.Tick += new
System.EventHandler(this.timerDF_Tick) statement? I would put it in your
Load event, or somewhere near the init of the win form.
It's in InitializeComponent.
But, It doesn't look like you are doing anything wrong (although I would use System.Timers.Timer as opposed to System.Windows.Forms.Timer). Also, you
shouldn't need to call textProcessTime.Update() or this.Update().

Have you tried placing a breakpoint in the timerDF_Tick event to see if it
is not firing?
I did put a breakpoing and it is not firing.

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Daniel P." <da******@hotmail.comU> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
| I'm trying to set a timer that gets called every 3 seconds so I can update a
| field in the UI with the time elapsed since the process started.
|
| What am I doing wrong that timerDF_Tick does not get called?
|
|
|
| private System.Windows.Forms.Timer timerDF;
| this.timerDF = new System.Windows.Forms.Timer(this.components);
|
| this.timerDF.Interval = 3000;
| this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);
|
| timerDF.Enabled = true;
| timerDF.Start();
|
|
| // here I call a stored procedure that takes about 10 minutes to run
| .....
|
| private void timerDF_Tick(object sender, System.EventArgs e)
| {
| DateTime dt2 = DateTime.Now;
| TimeSpan diff = dt2 - dt1 ;
|
| textProcessTime.Text = string.Format( "{0}:{1}:{2}",
| diff.Hours.ToString("00"),
| diff.Minutes.ToString("00"),
| diff.Seconds.ToString("00") );
|
| textProcessTime.Update();
|
| this.Update();
| }
|
|

Nov 16 '05 #3
Hi,
inline

"Daniel P." <da******@hotmail.comU> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
I'm trying to set a timer that gets called every 3 seconds so I can update a field in the UI with the time elapsed since the process started.

What am I doing wrong that timerDF_Tick does not get called?


The timer event can only fire if the message loop is running and it's
blocked because the 10minute during sp is executed inside an event handler
(or inside a function that's called from an event handler).

There are other timers that can fire while the message loop is blocked, but
it won't do you any good because then you would have to marshal from a
system thread to the UI thread, which also doesn't work when the message
loop is blocked.

What you need to do : call this 10minute stored procedure from a
workerthread. Then the message-loop won't be blocked and timer event's will
fire.

eg:

public void SomeMethod()
{ private System.Windows.Forms.Timer timerDF;
this.timerDF = new System.Windows.Forms.Timer(this.components);

this.timerDF.Interval = 3000;
this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);

timerDF.Enabled = true;
timerDF.Start();
Thread tr = new Thread(new ThreadStart(RunSP));
tr.Start();
}

public void RunSP()
{
// here you should call a stored procedure that takes about 10
minutes to run,
// so it doesn't block the UI thread (message loop)
}
HTH,
greetings

private void timerDF_Tick(object sender, System.EventArgs e)
{
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2 - dt1 ;

textProcessTime.Text = string.Format( "{0}:{1}:{2}",
diff.Hours.ToString("00"),
diff.Minutes.ToString("00"),
diff.Seconds.ToString("00") );

textProcessTime.Update();

this.Update();
}

Nov 16 '05 #4
Thanks! That did it. The worker thread is doing its job while the main
thread displays the updated timer.
Is there a more efficient way to wait for the worker thread then using Sleep
as below?
I was thinking to use a callback to the main thread but that creates strong
coupling.

Thread t = new Thread(new ThreadStart( myObj.ThreadProc ) );
t.Start();

while( true == t.IsAlive )
{
Thread.Sleep(1000);
UpdateTimeElapsed();
}
"BMermuys" <so*****@someone.com> wrote in message
news:29***********************@phobos.telenet-ops.be...
Hi,
inline

"Daniel P." <da******@hotmail.comU> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
I'm trying to set a timer that gets called every 3 seconds so I can
update a
field in the UI with the time elapsed since the process started.

What am I doing wrong that timerDF_Tick does not get called?
The timer event can only fire if the message loop is running and it's
blocked because the 10minute during sp is executed inside an event handler
(or inside a function that's called from an event handler).

There are other timers that can fire while the message loop is blocked,

but it won't do you any good because then you would have to marshal from a
system thread to the UI thread, which also doesn't work when the message
loop is blocked.

What you need to do : call this 10minute stored procedure from a
workerthread. Then the message-loop won't be blocked and timer event's will fire.

eg:

public void SomeMethod()
{
private System.Windows.Forms.Timer timerDF;
this.timerDF = new System.Windows.Forms.Timer(this.components);

this.timerDF.Interval = 3000;
this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);

timerDF.Enabled = true;
timerDF.Start();

Thread tr = new Thread(new ThreadStart(RunSP));
tr.Start();
}

public void RunSP()
{
// here you should call a stored procedure that takes about 10
minutes to run,
// so it doesn't block the UI thread (message loop)
}
HTH,
greetings

private void timerDF_Tick(object sender, System.EventArgs e)
{
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2 - dt1 ;

textProcessTime.Text = string.Format( "{0}:{1}:{2}",
diff.Hours.ToString("00"),
diff.Minutes.ToString("00"),
diff.Seconds.ToString("00") );

textProcessTime.Update();

this.Update();
}


Nov 16 '05 #5

"Daniel P." <da******@hotmail.comU> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Thanks! That did it. The worker thread is doing its job while the main
thread displays the updated timer.
Is there a more efficient way to wait for the worker thread then using Sleep as below?
I was thinking to use a callback to the main thread but that creates strong coupling.

Thread t = new Thread(new ThreadStart( myObj.ThreadProc ) );
t.Start();

while( true == t.IsAlive )
{
Thread.Sleep(1000);
UpdateTimeElapsed();
}

If you wait for the thread to end, then you don't gain much by using a
worker thread. You're are still blocking the message loop this way,
remember that's it's no good to do lenghty operations inside eventhandlers,
they make the UI non-responsive.

Start the timer and thread, don't wait for the thread to end, but let the
thread fire an event when it's done, and from that event you could stop the
timer.
HTH,
greetings

"BMermuys" <so*****@someone.com> wrote in message
news:29***********************@phobos.telenet-ops.be...
Hi,
inline

"Daniel P." <da******@hotmail.comU> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
I'm trying to set a timer that gets called every 3 seconds so I can update
a
field in the UI with the time elapsed since the process started.

What am I doing wrong that timerDF_Tick does not get called?


The timer event can only fire if the message loop is running and it's
blocked because the 10minute during sp is executed inside an event

handler (or inside a function that's called from an event handler).

There are other timers that can fire while the message loop is blocked,

but
it won't do you any good because then you would have to marshal from a
system thread to the UI thread, which also doesn't work when the message
loop is blocked.

What you need to do : call this 10minute stored procedure from a
workerthread. Then the message-loop won't be blocked and timer event's

will
fire.

eg:

public void SomeMethod()
{
private System.Windows.Forms.Timer timerDF;
this.timerDF = new System.Windows.Forms.Timer(this.components);

this.timerDF.Interval = 3000;
this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);

timerDF.Enabled = true;
timerDF.Start();

Thread tr = new Thread(new ThreadStart(RunSP));
tr.Start();
}

public void RunSP()
{
// here you should call a stored procedure that takes about 10
minutes to run,
// so it doesn't block the UI thread (message loop)
}
HTH,
greetings

private void timerDF_Tick(object sender, System.EventArgs e)
{
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2 - dt1 ;

textProcessTime.Text = string.Format( "{0}:{1}:{2}",
diff.Hours.ToString("00"),
diff.Minutes.ToString("00"),
diff.Seconds.ToString("00") );

textProcessTime.Update();

this.Update();
}



Nov 16 '05 #6
A while loop with a Sleep seems to work fine.

If I use an event and the ClickButton method ends after starting the thread
then how can I keep the UI disabled so the user cannot click the button
again or launch other reports?
"BMermuys" <so*****@someone.com> wrote in message
news:QS***********************@phobos.telenet-ops.be...

"Daniel P." <da******@hotmail.comU> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Thanks! That did it. The worker thread is doing its job while the main
thread displays the updated timer.
Is there a more efficient way to wait for the worker thread then using Sleep
as below?
I was thinking to use a callback to the main thread but that creates

strong
coupling.

Thread t = new Thread(new ThreadStart( myObj.ThreadProc ) );
t.Start();

while( true == t.IsAlive )
{
Thread.Sleep(1000);
UpdateTimeElapsed();
}


If you wait for the thread to end, then you don't gain much by using a
worker thread. You're are still blocking the message loop this way,
remember that's it's no good to do lenghty operations inside

eventhandlers, they make the UI non-responsive.

Start the timer and thread, don't wait for the thread to end, but let the
thread fire an event when it's done, and from that event you could stop the timer.
HTH,
greetings

"BMermuys" <so*****@someone.com> wrote in message
news:29***********************@phobos.telenet-ops.be...
Hi,
inline

"Daniel P." <da******@hotmail.comU> wrote in message
news:u8**************@TK2MSFTNGP12.phx.gbl...
> I'm trying to set a timer that gets called every 3 seconds so I can

update
a
> field in the UI with the time elapsed since the process started.
>
> What am I doing wrong that timerDF_Tick does not get called?
>
>

The timer event can only fire if the message loop is running and it's
blocked because the 10minute during sp is executed inside an event handler (or inside a function that's called from an event handler).

There are other timers that can fire while the message loop is blocked,
but
it won't do you any good because then you would have to marshal from a
system thread to the UI thread, which also doesn't work when the
message loop is blocked.

What you need to do : call this 10minute stored procedure from a
workerthread. Then the message-loop won't be blocked and timer event's will
fire.

eg:

public void SomeMethod()
{
> private System.Windows.Forms.Timer timerDF;
> this.timerDF = new System.Windows.Forms.Timer(this.components);
>
> this.timerDF.Interval = 3000;
> this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);
>
> timerDF.Enabled = true;
> timerDF.Start();
>
Thread tr = new Thread(new ThreadStart(RunSP));
tr.Start();
}

public void RunSP()
{
// here you should call a stored procedure that takes about

10 minutes to run,
// so it doesn't block the UI thread (message loop)
}
HTH,
greetings
> private void timerDF_Tick(object sender, System.EventArgs e)
> {
> DateTime dt2 = DateTime.Now;
> TimeSpan diff = dt2 - dt1 ;
>
> textProcessTime.Text = string.Format( "{0}:{1}:{2}",
> diff.Hours.ToString("00"),
> diff.Minutes.ToString("00"),
> diff.Seconds.ToString("00") );
>
> textProcessTime.Update();
>
> this.Update();
> }
>
>



Nov 16 '05 #7
Hi,

"Daniel P." <da******@hotmail.comU> wrote in message
news:Os***************@TK2MSFTNGP10.phx.gbl...
A while loop with a Sleep seems to work fine.
Can you minimize, maximize or move your form ?

If I use an event and the ClickButton method ends after starting the thread then how can I keep the UI disabled so the user cannot click the button
again or launch other reports?
Sure, using threads may cause re-entrance problems, but that's easely
solved. Disable the button after the user presses it:
command1.Enabled = false;

Then re-enable it after the finish-event fired:
command1.Enabled = true;

I know threads can cause new problems but you should really not make long
loops in UI-event-handlers. There is always one thread (the main thread)
and for windows applications also called the UI thread. This thread does
nothing else then asking the OS if there is a message (mouse_click,
key_pressed, etc) and then runs the appropriote event (this event loop is
inside Application.Run). So only one event can happen at any time. If you
do lenghty operations inside an event, no other events have a chance to
fire, you block the UI.

HTH,
greetings


"BMermuys" <so*****@someone.com> wrote in message
news:QS***********************@phobos.telenet-ops.be...

"Daniel P." <da******@hotmail.comU> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Thanks! That did it. The worker thread is doing its job while the main
thread displays the updated timer.
Is there a more efficient way to wait for the worker thread then using

Sleep
as below?
I was thinking to use a callback to the main thread but that creates

strong
coupling.

Thread t = new Thread(new ThreadStart( myObj.ThreadProc ) );
t.Start();

while( true == t.IsAlive )
{
Thread.Sleep(1000);
UpdateTimeElapsed();
}


If you wait for the thread to end, then you don't gain much by using a
worker thread. You're are still blocking the message loop this way,
remember that's it's no good to do lenghty operations inside

eventhandlers,
they make the UI non-responsive.

Start the timer and thread, don't wait for the thread to end, but let the
thread fire an event when it's done, and from that event you could stop

the
timer.
HTH,
greetings

"BMermuys" <so*****@someone.com> wrote in message
news:29***********************@phobos.telenet-ops.be...
> Hi,
> inline
>
> "Daniel P." <da******@hotmail.comU> wrote in message
> news:u8**************@TK2MSFTNGP12.phx.gbl...
> > I'm trying to set a timer that gets called every 3 seconds so I can update
> a
> > field in the UI with the time elapsed since the process started.
> >
> > What am I doing wrong that timerDF_Tick does not get called?
> >
> >
>
> The timer event can only fire if the message loop is running and it's > blocked because the 10minute during sp is executed inside an event

handler
> (or inside a function that's called from an event handler).
>
> There are other timers that can fire while the message loop is

blocked, but
> it won't do you any good because then you would have to marshal from a > system thread to the UI thread, which also doesn't work when the message > loop is blocked.
>
> What you need to do : call this 10minute stored procedure from a
> workerthread. Then the message-loop won't be blocked and timer event's will
> fire.
>
> eg:
>
> public void SomeMethod()
> {
> > private System.Windows.Forms.Timer timerDF;
> > this.timerDF = new System.Windows.Forms.Timer(this.components);
> >
> > this.timerDF.Interval = 3000;
> > this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);
> >
> > timerDF.Enabled = true;
> > timerDF.Start();
> >
> Thread tr = new Thread(new ThreadStart(RunSP));
> tr.Start();
> }
>
> public void RunSP()
> {
> // here you should call a stored procedure that takes about 10 > minutes to run,
> // so it doesn't block the UI thread (message loop)
> }
>
>
> HTH,
> greetings
>
>
> > private void timerDF_Tick(object sender, System.EventArgs e)
> > {
> > DateTime dt2 = DateTime.Now;
> > TimeSpan diff = dt2 - dt1 ;
> >
> > textProcessTime.Text = string.Format( "{0}:{1}:{2}",
> > diff.Hours.ToString("00"),
> > diff.Minutes.ToString("00"),
> > diff.Seconds.ToString("00") );
> >
> > textProcessTime.Update();
> >
> > this.Update();
> > }
> >
> >
>
>



Nov 16 '05 #8
"BMermuys" <so*****@someone.com> wrote in message
news:GW***********************@phobos.telenet-ops.be...
Hi,

"Daniel P." <da******@hotmail.comU> wrote in message
news:Os***************@TK2MSFTNGP10.phx.gbl...
A while loop with a Sleep seems to work fine.
Can you minimize, maximize or move your form ?


No, but it does not look like an issue for the user.
If I use an event and the ClickButton method ends after starting the

thread
then how can I keep the UI disabled so the user cannot click the button
again or launch other reports?


Sure, using threads may cause re-entrance problems, but that's easely
solved. Disable the button after the user presses it:
command1.Enabled = false;

Then re-enable it after the finish-event fired:
command1.Enabled = true;


Yes, I was thinking to do that but the user can close the Form or close the
app or launch another report, etc and this is not good.
I know threads can cause new problems but you should really not make long
loops in UI-event-handlers. There is always one thread (the main thread)
and for windows applications also called the UI thread. This thread does
nothing else then asking the OS if there is a message (mouse_click,
key_pressed, etc) and then runs the appropriote event (this event loop is
inside Application.Run). So only one event can happen at any time. If you do lenghty operations inside an event, no other events have a chance to
fire, you block the UI.
The while loop with a Sleep does not seem to take a lot of CPU, the worker
thread does its job fine and for the time being I'll leave it the way it is
but I am still interested in a better solution for a future release.
HTH,
greetings
Thanks!!!

"BMermuys" <so*****@someone.com> wrote in message
news:QS***********************@phobos.telenet-ops.be...

"Daniel P." <da******@hotmail.comU> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
> Thanks! That did it. The worker thread is doing its job while the main > thread displays the updated timer.
> Is there a more efficient way to wait for the worker thread then using Sleep
> as below?
> I was thinking to use a callback to the main thread but that creates
strong
> coupling.
>
> Thread t = new Thread(new ThreadStart( myObj.ThreadProc ) );
> t.Start();
>
> while( true == t.IsAlive )
> {
> Thread.Sleep(1000);
> UpdateTimeElapsed();
> }
>

If you wait for the thread to end, then you don't gain much by using a
worker thread. You're are still blocking the message loop this way,
remember that's it's no good to do lenghty operations inside

eventhandlers,
they make the UI non-responsive.

Start the timer and thread, don't wait for the thread to end, but let the thread fire an event when it's done, and from that event you could
stop
the
timer.
HTH,
greetings

>
> "BMermuys" <so*****@someone.com> wrote in message
> news:29***********************@phobos.telenet-ops.be...
> > Hi,
> > inline
> >
> > "Daniel P." <da******@hotmail.comU> wrote in message
> > news:u8**************@TK2MSFTNGP12.phx.gbl...
> > > I'm trying to set a timer that gets called every 3 seconds so I can > update
> > a
> > > field in the UI with the time elapsed since the process started.
> > >
> > > What am I doing wrong that timerDF_Tick does not get called?
> > >
> > >
> >
> > The timer event can only fire if the message loop is running and it's > > blocked because the 10minute during sp is executed inside an event
handler
> > (or inside a function that's called from an event handler).
> >
> > There are other timers that can fire while the message loop is

blocked,
> but
> > it won't do you any good because then you would have to marshal
from a > > system thread to the UI thread, which also doesn't work when the

message
> > loop is blocked.
> >
> > What you need to do : call this 10minute stored procedure from a
> > workerthread. Then the message-loop won't be blocked and timer

event's
> will
> > fire.
> >
> > eg:
> >
> > public void SomeMethod()
> > {
> > > private System.Windows.Forms.Timer timerDF;
> > > this.timerDF = new System.Windows.Forms.Timer(this.components);
> > >
> > > this.timerDF.Interval = 3000;
> > > this.timerDF.Tick += new System.EventHandler(this.timerDF_Tick);
> > >
> > > timerDF.Enabled = true;
> > > timerDF.Start();
> > >
> > Thread tr = new Thread(new ThreadStart(RunSP));
> > tr.Start();
> > }
> >
> > public void RunSP()
> > {
> > // here you should call a stored procedure that takes

about 10
> > minutes to run,
> > // so it doesn't block the UI thread (message loop)
> > }
> >
> >
> > HTH,
> > greetings
> >
> >
> > > private void timerDF_Tick(object sender, System.EventArgs e)
> > > {
> > > DateTime dt2 = DateTime.Now;
> > > TimeSpan diff = dt2 - dt1 ;
> > >
> > > textProcessTime.Text = string.Format( "{0}:{1}:{2}",
> > > diff.Hours.ToString("00"),
> > > diff.Minutes.ToString("00"),
> > > diff.Seconds.ToString("00") );
> > >
> > > textProcessTime.Update();
> > >
> > > this.Update();
> > > }
> > >
> > >
> >
> >
>
>



Nov 16 '05 #9

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

Similar topics

18
by: Joe | last post by:
Hi, I am trying to alter the refresh rate of an online webpage in a webbrowser control using MFC. However the Timer ID is stored in a local variable and I don't know how to access it. Is there a...
5
by: csgraham74 | last post by:
HI all, I want to implement this scenario: I need my ASP.NET website to check a SQL table every 30 seconds and if there is a change to display a message to user. I have created a panel control...
7
by: Mike Eaton | last post by:
Hi All, I have a simple application that allows users to clock in and out and stores the data for use by the payroll department. It spends most of its life as a tray icon and when the user...
4
by: Altman | last post by:
I want to start a timer when an object loads, so I put the code to start it in the constructor. The problem I am having is that when I put the object on a form in development it starts the timer. ...
5
by: Tom Edelbrok | last post by:
I have narrowed down a previous problem to the following more specific items: 1) I have my startup object in VB.NET (VS 2003) set to Sub Main(). 2) Inside of Sub Main() I do a...
19
by: arunkumar_m2001 | last post by:
Can Somebody help me to code a timed test. Actually I want to implement a timer in a web application which will pop-up an alert automatically by refreshing the web page after a specific time. ...
0
by: John Mason | last post by:
Hello, I have a small client app using a timer control that communicates with a Windows service using .NET remoting. Both apps were authored against the 1.1.4322 framework. The timer controls...
12
by: Gina_Marano | last post by:
I have created an array of timers (1-n). At first I just created windows form timers but I read that system timers are better for background work. The timers will just be monitoring different...
2
by: Elliot | last post by:
My program use a timer to 'refresh' a method "a" every several seconds, private void a(object sender, EventArgs eArgs) { Timer T1 = new Timer(); T1.Interval = 100000; T1.Start(); T1.Tick +=...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.