Solved

TGRChart flashing on update

Posted on 1998-10-25
15
142 Views
Last Modified: 2010-08-05
I'm using TQRChart to draw a real-time line graph of net bandwidth usage.  I'm updating it every second, but about 50% of the time, it flashes white quickly on the update.  It is really annoying.  Any ideas of how to fix this?
0
Comment
Question by:kdw
  • 7
  • 7
15 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1344272
Take a look at the LockWindowUpdate systemcall, it freezes the window while you are updating it.
Call LockWindowUpdate(MyForm.Handle) to start the lock and LockWindowUpdate(0) to release the window again.

0
 

Author Comment

by:kdw
ID: 1344273
It doesn't really seem to help.  I lock it, remove one point from the front, add one to the end, then unlock it, and still get flashing about 50% of the time.
0
 

Author Comment

by:kdw
ID: 1344274
it doesn't really seem to help.  I lock it, remove one point from the front, add one to the end, then unlock it, and
       still get flashing about 50% of the time.
0
Independent Software Vendors: 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 8

Expert Comment

by:ZifNab
ID: 1344275
Hi kdw,

heh? QRChart as graphing component on a form? It's a wrapper component for TeeChart component...

TQRChart is just used to put a TeeChart on a print-form... And making a document for the printer isn't real-time... ???? So I think you're working with a wrong component. TQRChart is used with a TQuickRep.

So , put a TDBChart OR TChart on your form!

Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344276
kwd,

 so it's normal that you get flashes when using TQRChart! I think it just uses a bitmap jpeg to draw on it's canvas. It uses a undelying teechart to first draw the things and then put it in total on the canvas...

Zif.
0
 

Author Comment

by:kdw
ID: 1344277
QRChart is the one you can actually draw onto a form with the IDE.  QRDBChart is automatically included also. Regardless, the chart works but flashes.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344278
kdw,

 are you talking of Quickreport chart or does QR stands for something else?

 If you take the standard charting components of D3, then you have : TChart and TDBChart. For printing purposes you've a wrapper TQRChart.

Now if QR stands for Quickreport, then you are using the wrong components, instead you need to use TChart.

Now, for what stands QR in your case? From which company is this charting tool?

Zif.
0
 

Author Comment

by:kdw
ID: 1344279
Its the standard reports in the QReport TAB shipped with D3.
If QRChart is the wrong one, which on of the standard controls should I be using?

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344280
Hi kwd,

you're talking of the wrapper of TChart for QuickRep, so your working with the wrong component.

 You've to go to the 'additional' tab and select TChart. If you're working with DB then you've to go to 'data controls' and select TDBChart.

! Tchart is only standard from version 3 of delphi!

Regards, Zif.
0
 

Author Comment

by:kdw
ID: 1344281
Like I said, the QRChart (which will include QRDBChart), are the only ones available in the IDE to draw on.  I'm not sure what you are suggesting I do to fix this.

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344282
kwd, which version of Delphi are you using?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344283
if you're using D3 or D4 and you don't find the components TChart, TDBChart, then install these ones. You should normally have them. (look for TeeChart) Zif.
0
 

Author Comment

by:kdw
ID: 1344284
You the MAN.  Thanks for sticking with me.  Submit the answer again and I'll grade it.  Thanks.

0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1344285
Hi kdw,

 weren't the TChart components installed?

to answer :

TQRChart is just used to put a TeeChart on a print-form... And making a document for the printer isn't real-time... ???? So I think you're working with a wrong component. TQRChart is used with a TQuickRep.

So , put a TDBChart OR TChart on your form.

Regards, Zif.

0
 

Author Comment

by:kdw
ID: 1344286
DBChart was the trick.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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