箭头关键事件 [英] arrow key events

查看:66
本文介绍了箭头关键事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个包含3个图表区域的图表。我正在捕获一些键以允许特定处理。图表控件
成功检测到KeyDown事件中的所有特殊键
但箭头键。

I have a chart with 3 chart areas. I am capturing some keys to allow specific processing. Chart control successfully detects all special keys in the KeyDown event but the arrow keys.

无论我做什么,它都不会检测箭头按键。我还介绍了KeyPress,所以我绝对确定我捕获了每个关键事件,但我的代码仍然完全忽略了箭头键。

No matter what I do, it does not detect arrow key presses. I also introduced KeyPress, just so I am absolutely sure I capture every key event, and still my code completely ignores arrow keys.

当我在调试模式下运行代码时,有时候很难按照每个按键,现在我需要帮助!

As I run the code in debug mode, it gets difficult sometimes to follow each key press and now I need help!

谢谢,

DP。

DP

我还在图表控件上引入了PreviewKeyDown事件,现在所有键都通过了这个调用但是 然后,对除ARROW键之外的所有键也进行KeyDown调用。

I also introduced PreviewKeyDown event on the chart control, and now all keys pass through this call but  then the KeyDown call is also made for all keys except ARROW keys.

任何有识之士。

谢谢

DP。

推荐答案

好吧伙计,

由于没有人有任何建议,这就是我所做的。

Since no one has any suggestion, here is what I did.

我使用  PreviewKeyDown  在那里检测并调用适当的操作。不知道这个练习有多好是
但它现在正在使用,直到我发现我的代码出了什么问题。

I used PreviewKeyDown to detect and called appropriate action right there. Don't know how good this practice is but it's now in use till I find out what's really wrong with my code.

谢谢,

DP


这篇关于箭头关键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆