I have a Winform running and a timer (winform) firing each 3 min to make a
transmition of data..I'm ok about the UI stoping for a while, the problems is
that the timer fires two times in every interval, even if I use time.Stop.
It seems that the stop instruction is not stoping the timer associated counter
Private Sub TimerTransmite_Tick(....)
TimerTrans.Stop()
Transfer()
TimerTrans.Start()
End
Any Sug?
TCORDON - 20 Jan 2005 21:59 GMT
If the timer has the interval you want why would you want to stop and start
it every time?
As for the UI stoping, have you considered running Transfer() on a different
thread? You could have Trasnfer() Start the timer when it finishes and you
UI would not stop.
Regards,
>I have a Winform running and a timer (winform) firing each 3 min to make a
> transmition of data..I'm ok about the UI stoping for a while, the problems
[quoted text clipped - 11 lines]
>
> Any Sug?
Kenny M. - 20 Jan 2005 22:43 GMT
hi
well, I'm stoping the timer because in the transfer procedure I'm sending
critical information (money) as a long string to a WebService (sincronous) so
I dont want to the timer overlaps the previous Tick event if the webservice
take to long to return.
To be honest, I was playing aroung with Asinc WS and the result was my Data
being duplicated when I sent it to the server, so I'm a little bit frustated
with Async ws
> If the timer has the interval you want why would you want to stop and start
> it every time?
[quoted text clipped - 20 lines]
> >
> > Any Sug?
Herfried K. Wagner [MVP] - 20 Jan 2005 23:00 GMT
"Kenny M." <KennyM@discussions.microsoft.com> schrieb:
>I have a Winform running and a timer (winform) firing each 3 min to make a
> transmition of data..I'm ok about the UI stoping for a while, the problems
> is
> that the timer fires two times in every interval, even if I use time.Stop.
What type of timer are you using? Are you sure you are using a
'System.Windows.Forms.Timer'?

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Kenny M. - 21 Jan 2005 00:39 GMT
yeap I'm Sure it is a Windows.forms.Timer that I Drag from the toolbox
it is pretty simple to see what I said. just set an interval (60000) and set
a breakpoint on transfer and you will see that after the breakpoint stop and
press F5 inmediatly the Breakpoint is fired again
Private Sub TimerTrans_Tick(....)
TimerTrans.Stop()
Transfer()
TimerTrans.Start()
End
thks
> "Kenny M." <KennyM@discussions.microsoft.com> schrieb:
> >I have a Winform running and a timer (winform) firing each 3 min to make a
[quoted text clipped - 4 lines]
> What type of timer are you using? Are you sure you are using a
> 'System.Windows.Forms.Timer'?