Page 1 of 1

CursorTool outside of control

Posted: Fri Jan 23, 2009 12:31 pm
by 6926780
Hello,

we are using TChart 3.5.3274.30663. In our MDI application we use a CursorTool in the TChart. We set the position of that CursorTool manually. The maximum and minimum of the axis are set manually, too.
The FastCursor property is set to "true".

Sometimes the position is outside of the control. So we can see the CursorTool outside of the MDI-Child. Even if we put any other window (like the Windows Explorer) in front of our application, we can see that CursorTool in that window.
I found a hint about the AfterDrwaEvent of the TChart in which you can activate the CursorTool. But this did not work.

Is there any other hint to solve that problem?

Thanks in advance!
Best regards
Marco

Posted: Fri Jan 23, 2009 12:34 pm
by narcis
Hi Marco,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advacne.

Posted: Mon Jan 26, 2009 6:48 am
by 6926780
Hello Narcis,

I posted the example project at your upload page.
Thanks in advance!
Best regards
Marco

Posted: Mon Jan 26, 2009 11:19 am
by narcis
Hi Marco,

Thanks for the example project. I could reproduce the issue here. Setting FastCursor=false works fine for me here. It's because when FastCursor is set to true CursorTool uses the ControPaint class:

http://msdn.microsoft.com/en-us/library ... paint.aspx

Posted: Mon Jan 26, 2009 12:53 pm
by 6926780
Hello Narcis,

thanks a lot for your fast reply!
It works fine, but then I will get problems with the CPU load. I have the CursorTool and a pointer serie, where I add points automatically. With the property FastCursor = true, I am able to add about 3000 Points before the CPU load gets about 90%. With FastCursor = false, I only need about 200 Points to get the same load. (We use a production PC: 1600 MHz, 1 GB RAM)
So I decided to set the property to true.

Do have any other idea? If you like, I could send you the example project.
Thanks in advance!
Best regards
Marco

Posted: Tue Jan 27, 2009 11:34 am
by narcis
Hi Marco,

I'm afraid not. Those are the options. The ControlPaint class has those side effects. Also, following advices on the Real-time Charting article here may help optimize your application performance. It's a Delphi article but most of it can be applied to the .NET version.

Posted: Wed Jan 28, 2009 7:16 am
by 6926780
Hello Narcis,

thanks a lot. I found that article last week, but I am not able to use a FastSerie, because the serie has no possibility to draw single points instead of a line.
Our customers want to see only the single points which we added. A "normal" Points serie is too slow in conjunction with the "not-fast" CursorTool. We are able to add only about 400 points and then our CPU load is about 100%.
Thanks in advance
Best regards
Marco