Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph Finding Plot Area

Does anyone know a way of finding the screen co-ordinates of the plot area
on a CWGraph ?
0 Kudos
Message 1 of 2
(3,240 Views)
Chris:

Unfortunately, there's not an easy way to do this. It's possible to retrieve the image of a control with the ControllImage method--this was added in version 2.0 of ComponentWorks. The reason a control does not export support for positioning and sizing is that these features are influenced by the control's container. In Microsoft Visual Basic you can access a control's position and size with the Left, Top, Width, and Height properties. These measurements are expressed in twips. In Microsoft Visual C++ you can use GetClientRect().

It's also worthwhile to point out that most UI Editors, including Microsoft Visual Basic, provide a mechanism for finding the exact size and position of a control on a form.

The problem now is how to find the coordinates of a sub-obj
ect within a control, like the Plot Area within a CWGraph control. Again, this is pretty difficult to do. My best suggestion would be to save the image of the graph to a file and open this in a graphical editor, where you can blow the image up and count the pixels yourself.

Best Regards,

Chris Wood
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,240 Views)