473,403 Members | 2,284 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,403 software developers and data experts.

Countdown Timer Text Background Flashes every second

I have a cell in a Layout Panel in a C# project that contains text that represents a countdown. Every second the text updates to show the time remaining. The background color of the cell is dark green and the text is white. The problem is that everytime the text changes (every second) the background of that cell flashes white for an extremely brief, but annoying moment. Does anyone know how to eliminate the flashing? Thanks for considering my problem.
May 17 '10 #1
5 2808
GaryTexmo
1,501 Expert 1GB
Sorry, I don't know what you mean by Layout Panel or a cell in it. I looked in my Visual Studio and I had a FlowLayoutPanel and a TableLayoutPanel, but those just hold controls so you can't actually update text in them.

It would be helpful if you could paste a bit of code to describe the problem you're having. I'm not sure what else to suggest at this point, sorry!
May 17 '10 #2
jkmyoung
2,057 Expert 2GB
Every time the text changes, it forces a redraw of the panel. Try putting the text in it's own textbox instead. The reduction in background size might make the flash less noticeable, if it still occurs.

Another thing to try might be to set the parent control's background to the same color, if this is possible (eg doesn't ruin something else).
May 17 '10 #3
markmcgookin
648 Expert 512MB
Is this a WPF application?
May 17 '10 #4
Gary: Sorry, its a Table Layout Panel
Mark: Nope, not a WPF
JKM: Setting the parent to the same background color helped a lot. The flash is still there, but its the same color flash as the backround so not quite so noticable. Would still like to eliminate it if I could.
May 17 '10 #5
GaryTexmo
1,501 Expert 1GB
What have you got inside the TableLayoutPanel that you're setting text on? So far as I can tell, you just put controls in so sorry, I'm a bit confused. I can't really help you until I understand it better.

Code or a sample project might help. Actually that's something I like to do in general when I'm working on a larger problem. Wherever possible, I'll boil it down to something that fits inside a simple example project and test/debug there before working on the larger product. If anything, it saves compile time if your main project is large ;) Sorry for the digression there, but yes please help us understand what we're dealing with.

Thanks!
May 17 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bonnett | last post by:
I have been creating a generic countdown timer (source code below), counting the seconds, minutes, hours and days till an event, but I have having trouble with it finding out how many hours are...
4
by: Christine | last post by:
I've implemented a countdown timer for a tutorial web page that should give the user 45 minutes to complete the test, only to find that the timer is slowly 'losing' time. On average, it actually...
3
by: src_mag | last post by:
Hello, I'd like to write JavaScript code that refreshes a frame once a second loading a different image each time. Basically, here's what the script would do: 0 sec load img0.gif 1 sec load...
1
by: Will | last post by:
I have form showing instructions and logging actions and I would like the form to show a count down timer for a certain period of time. E.g. 30 secs, going down to 0 and then displaying the action....
1
by: Dirk Hagemann | last post by:
Hi! I'd like to implement a countdown timer on a webite. It should show the months, days, hours, minutes and seconds until a given date and time. So far it's not really difficult, but this...
1
by: enggars | last post by:
Hello. Is there any way to create a countdown timer in ASP pages? I am working on some quiz project, and it needs time limitation. I tried to use the javascript as the time limitation. But the...
1
by: DennyLoi | last post by:
Hi everyone. I am trying to implement a countdown timer which is displayed on my page. The counter needs to countdown from 10 seconds to 0 upon the page loading up. I tried the following, but...
9
nomad
by: nomad | last post by:
Hello everyone again: Ok I figured out the quiz section and now I need to but a timer on the test. if anyone knows how to do a countdown timer that will only lasts for 30mins(or what ever time)...
9
by: MC | last post by:
I would like to display a timer in the corner of the page that shows the user how many minutes:seconds till the session times out. Are there any good examples out there? Google has again failed...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.