Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Cursor color
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

NicoG

France
12 Posts

Posted - 28 Dec 2017 :  03:50:38  Show Profile  Reply with Quote
Good morning,

Since I updated the version from 2.3.0.4 to 3.0.0.1, I have an issue with the color of the cursor.
The cursor is always black, when the user turns the chart background to black, the cursor stays black. On the previous version, the cursor was automatically turning to white.
I tried the following method but that doesn't change anything :

dataCursorObj.SetColor(Color.White)

Any idea ?
Thanks

quinncurtis

1555 Posts

Posted - 29 Dec 2017 :  16:25:25  Show Profile  Reply with Quote
In previous versions the cursor was drawn using the .Net XOR line drawing API, so it always contrasted against the background. But Windows 10 does not work properly with the .Net XOR line drawing API (intentionally and it fails in all versions of .Net, including the most recent) for any scale other than 100%, and the only way to resolve it is to NOT use XOR drawing. In all other Microsoft .Net related frameworks (WPF, Silverlight, Windows App) XOR drawing has been completely eliminated as part of their drawing API. So we have removed all XOR drawing from the software and instead rely on simple line drawing instead. So that means that you have to choses a cursor color to contrast with whatever background you have.

You were close. To set the color of the the data cursur, set the color of the MouseMarker property internal to the DataCursor object:

dataCursorObj.MouseMarker.SetColor(Color.Green);
Go to Top of Page

NicoG

France
12 Posts

Posted - 03 Jan 2018 :  10:09:41  Show Profile  Reply with Quote
That works now, thanks!
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07