Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timer isn't ticking!
Message
De
07/11/2008 09:37:59
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
07/11/2008 09:23:57
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01360368
Message ID:
01360481
Vues:
6
Hi John,

Thanks for the info. I'll take a look.

However, I think that Tim's suggestion is the 'correct' way to handle this cross threading issue. There's lots on the web about the issue, now that I know what to look for.

I'll post the code that I used when I have it solved.

Thanks.
Mark



>Hi Mark,
>
>One thing I have discovered is that if the timer in the toolbox is used on a form that is not visible it most often will not fire. Instead I have resorted to the system timer which works all the time. System.threading.timer
>
>Perhaps that timer would work instead.
>
>John
>
>
>
>>Hi,
>>
>>I'm a VFP guy, just getting a handle on C#.
>>
>>I have a Winform, containing some custom controls (assemblies of buttons, labels and text boxes).
>>
>>I have an event being created (when a telephone call is received) and at that time I change some text on one of the custom controls.
>>
>>So far, so good - all works well.
>>
>>Now, when the phone rings, I want the line status text on my custom control to flash 'Ringing' rather than just display the word. So, I have added a timer that runs every second (when enabled) and changes the ForeColor of the status label to give a flashing effect.
>>
>>Except - it doesn't flash.
>>
>>I think it has something to do with threads. The fact that the timer on the custom control is enabled from an event handler seems to inhibit it's function somehow.
>>
>>If I set the timer to enabled at design time, then the text flashes from the start, proving that my flash code is OK.
>>
>>Any suggestions greatfully received.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform