Hi Mattias,
I try to process keyboard events to a TPaintBox, which does not have OnKeyDown etc. ?
I am writing a class which I hope to be as clean as possible. The class is called TPaintRect, which let me paint on certain part (rect) of a canvas.
I can of course try to interpret keyboard event of the form, but I hope not to interfere with other components (for example, avoid set Form.KeyPreview=true).
Is it possible?
Attached is a draft of my tpaintrect class.
Thanks a lot.
Sincerely,
Shannon
? ?, 1? 21, 2013 at 3:08 ???xrfang ???
Hi,
I want to use TApplicationProperties.OnUserInput to process keyboard/mouse events. ?But the parameter of this method is a Cardinal. ? My questions are:
1) How do I know its event type, such as keydown/keyup/keypress or mouse move etc?
2) How do I know the actual key that is pressed, or the X, Y coordinates of the mouse?
Thanks,
Shannon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130121/5a5b4c03/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.bz2
Type: application/x-bzip-compressed-tar
Size: 71680 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130121/5a5b4c03/attachment-0001.bin>