05-12-2007 02:35 PM
05-14-2007 03:07 AM
05-14-2007 08:34 AM
Hello,
I would agree with Roberto and use a canvas function to try and do this. Load the bitmap onto the canvas, then by using GetRelativeMouseState you will be able to extract the mouse co-ordinates from the canvas control you wish to target. When you get the X and the Y co-ords of the position you wish to compare against a set point you will need to calculate the difference of the X and Y values and using Complex numbers by converting the rectangular components to polar you will be returned a magnitude and an angle. Use ToPolar to achieve this found in the Advanced Analysis Library > Complex Operations > Complex Numbers. Also by getting the X and Y components you will be able to draw lines, etc on your canvas.
If you are unsure of how complex numbers will work for you use the LabWindows/CVI Help files or look here
Hope this helps!
Tom
NIUK