Lazarus
Free Pascal => Beginners => Topic started by: John_Nicol on June 18, 2017, 11:27:43 pm
-
I want to be able to provide the pixel coordinates in a picture and obtain a numerical or string definition of the colour represented by that pixel. Can someone provide a clear, simple code which will run in Lazrus Free Pascal? Thank you.
John Nicol
-
The OP on this thread (http://forum.lazarus.freepascal.org/index.php?topic=23016.0) by wjackson153 (who credits taazz) has a little program that seems to do what you are looking for (if I am understanding what you are looking for).
1) Put 3 labels on a form and a shape and a timer
2) double click the timer to create its default event handler
3) Replace all the code in the unit with what's in the OP on that thread.
BTW I don't know if you'll have this problem but I am on windows and the program wouldn't compile until I got rid of the MouseAndKeyInput entry (and its preceding comma) in the uses clause
-
BTW I don't know if you'll have this problem but I am on windows and the program wouldn't compile until I got rid of the MouseAndKeyInput entry (and its preceding comma) in the uses clause
http://wiki.freepascal.org/MouseAndKeyInput
-
BTW I don't know if you'll have this problem but I am on windows and the program wouldn't compile until I got rid of the MouseAndKeyInput entry (and its preceding comma) in the uses clause
http://wiki.freepascal.org/MouseAndKeyInput
Thanks, I should have realised that the problem occurred because I had not installed that package.
Still, the program seems to work fine without it on windows
-
Still, the program seems to work fine without it on windows
Its not required it is a left over from the OPs previous attempts. I never noticed it.
-
The OP did a double post. I answered it on:
http://forum.lazarus.freepascal.org/index.php/topic,37242.msg249742.html#msg249742