Hi, I have an image that I want to display the colour of the pixel under the cursor when the left mouse button is clicked.
I have the following section of code that does it (doesnt sound difficult does it.)... ==================== procedure TForm1.imageMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var colour:TColor; begin colour := Form1.image.Canvas.Pixels[X,Y]; ==================== However I always get -1 returned as the cliprect for the image canvas is always [0,0],[1,1] Looking at the help and trial and error I cannot set the cliprect parameters, so my question is how do these values get set at runtime, and also how can I actually get the colour being recognised? Cheers Chris ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
