Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i get the exactly data of the point?

i used the cusror to show the position of the point,but i found only "CWGraph1.Cursors(1).SnapMode = cwCSnapNearestPoint" can move the cursor from one point to another,but the cursor'pos isn't the exactly data of the point.how can i get it? i set four plots in the graph ,and need to show anyone point,and i only use one sub to load all doc'datas,so i can't to seach the array to found the data nearnest the cursor'pos.
i'm a green hand,who can help me?
0 Kudos
Message 1 of 4
(6,194 Views)
cwCSnapNearestPoint is the snap mode to use. How do you mean, the cursor position isn't the exactly data of the point? What are you using to return/display the coordinates of the cursor? Maybe you just need to change the format string being used to display the data. This would be the case if the discrepancy is a matter of the number of decimal places displayed.

If you haven’t yet, you may want to take a look at the example in \VB\Samples\UI\Graph\Cursors. CWGraph1_CursorChange updates the XPosition and YPosition TextEdit boxes with the cursor’s coordinates.

Regards,

Eric M
0 Kudos
Message 2 of 4
(6,177 Views)
i'm sorry to describe this problem unclearly.here is it:i need design such a program,a button which be clicked can load datas in a file,and the cwgraph show the datas in plots.but i don't know the datas precision ,so i can't use the "format" to show the data by cursor's pos,because there are maybe six numbers after the decimal,maybe five, the datas precision aren't equality .
how can i do it?thanks a lot.
0 Kudos
Message 3 of 4
(6,169 Views)
If the discrepancy is due to the number of decimal places displayed, then setting the format string mat still help even if you don’t know the exact precision of the data. You can set the format string to display more places than needed.

For example, if you know the data will have at most 9 decimal places of precision, you could set the format string for 9 places. If a particular value has less than 9 digits of precision, five for example, the TextBox will display the appropriate number of decimal places.
0 Kudos
Message 4 of 4
(6,144 Views)