http://delphi.about.com/od/objectpascalide/a/keyboard_events.htm 这里面也明确说了因为TImage,TPaintBox, TPanel and TLabel不能或者焦点,所以没有KeyPress事件,解决办法还是设置窗口的KeyPreview属性为True,然后在窗口的OnKeyDown处理。Some components, such as TImage, TPaintBox, TPanel and TLabel cannot receive focus. In general, components derived from TGraphicControl are unable to receive focus. Additionally, components that are invisible at run time (TTimer) cannot receive focus.
http://www.delphipages.com/forum/showthread.php?t=112000再找找看。
这里面也明确说了因为TImage,TPaintBox, TPanel and TLabel不能或者焦点,所以没有KeyPress事件,解决办法还是设置窗口的KeyPreview属性为True,然后在窗口的OnKeyDown处理。Some components, such as TImage, TPaintBox, TPanel and TLabel cannot receive focus. In general, components derived from TGraphicControl are unable to receive focus. Additionally, components that are invisible at run time (TTimer) cannot receive focus.