OnKeydown for “-” does not get fired in Delphi 7 application

你离开我真会死。 提交于 2019-12-02 12:10:15

David's comment is on the right track; You can (with version control) strip back the app until you understand what is going on. However I think that you need to understand the following concepts as well:

  1. OnKeyDown event in a form is not the only place that keyboard shortcuts could go. You should find out where else it's going to, which is why Sertac's comment is there.

  2. It is possible that something OUTSIDE your application is trapping that keyboard key (although this is more common with Control or Alt + Key combinations).

  3. It is possible that something inside your form, or elsewhere in your application is grabbing that key and consuming it.

  4. There is a good article here about KeyPreview, you need to understand that too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!