CursorTool outside of control

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Marco
Newbie
Newbie
Posts: 20
Joined: Fri Nov 15, 2002 12:00 am

CursorTool outside of control

Post by Marco » Fri Jan 23, 2009 12:31 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jan 23, 2009 12:34 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marco
Newbie
Newbie
Posts: 20
Joined: Fri Nov 15, 2002 12:00 am

Post by Marco » Mon Jan 26, 2009 6:48 am

Hello Narcis,

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jan 26, 2009 11:19 am

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
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marco
Newbie
Newbie
Posts: 20
Joined: Fri Nov 15, 2002 12:00 am

Post by Marco » Mon Jan 26, 2009 12:53 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 27, 2009 11:34 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marco
Newbie
Newbie
Posts: 20
Joined: Fri Nov 15, 2002 12:00 am

Post by Marco » Wed Jan 28, 2009 7:16 am

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

Post Reply