Solved

Updating labels quickly without a flicker

Posted on 2002-07-03
7
912 Views
Last Modified: 2010-04-04
I'm collecting data from a data Aquisition device.  Right now I'm only gathering the data about once per second.  I'm using pre-positioned labels on the form to display the information by the following method.

Inside a Timer loop with intervals at 1000
Query the Device
Assign the value to each label (about 30 labels)
application.processmessages

My labels flicker real bad and sometimes just blank out
with a white background like I'm not getting them displayed properly.

Is there a better way to handle this, or even a better way to display the data prepositioned on the form?

I can update a memo with the information to verify all the data is correct, and also to make sure the query isn't taking to long, so I believe it's the technique I'm attemping to use.
0
Comment
Question by:rwskinner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7126582
-place a panel as background-container
-set doublebuffered to true
0
 
LVL 3

Accepted Solution

by:
marcoszorrilla earned 50 total points
ID: 7126601
Try puttint DoubleBuffered:=True;
You can do a test with this very simple sample.

procedure TForm1.Button1Click(Sender: TObject);
var
i:Integer;
begin

DoubleBuffered:=True;
for i:=1 to 10000 do
begin
Application.ProcessMessages;
label1.Caption:=IntToStr(i);
end;


Best Regards.
Marcos.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7126629
btw. marcoszorrilla

take your points at q
http://www.experts-exchange.com/delphi/Q_20318113.html

meikl ;-)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7126632
Sorry Kretzschmar when I start to prepare my example ther is any answer.

Best Regards.
Marcos.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7126642
doesn't matter, marcos,

but take your points from qow 18 at
http://www.experts-exchange.com/delphi/Q_20318113.html
0
 

Expert Comment

by:Zoly
ID: 7127580
Also, using TStaticText instead of TLabel is always an idea worth considering. TStaticText is a TWinControl while TLabel is a TControl and so you get much smoother effects (less/no flicker) with TStaticText.

Z
0
 

Author Comment

by:rwskinner
ID: 7130831
Thanks for the help.  That cured the problem.  I added the refresh command as well and it helped.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month3 days, 19 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question