我自己做了一个usercontrol,添加了一个基于usercontrol的键盘事件,但是在form 中使用这个控件的时候却键盘事件,这是为什么?求各位帮忙解答
解决方案 »
- 插入数据到Access,提示“至少一个参数没有被指定值”
- hashtable限定数量输出问题
- 实时曲线问题
- C#如何添加控件?
- 如何获取当前的时间,关于datetime的
- 如何把 一个独立的 form 放到c#2005 中的TabControl 中 急(在线等)
- 在线急等~求高手指教~~急急急急急急急急急!!!!数据转换!!!!急急急急急急急急急急急急急急急急急急急急急急急
- 如何制作自动更新应用程序
- C# 实现类似qq鼠标悬浮 弹出窗口 显示具体信息
- 昨天通宵到现在,50多个小时没睡觉了,散分。
- 求急救啊!@C#高手速度进来帮忙
- 高手请进!如何在数据访问层中实现SQLSERVER连接ACCESS连接的简单切换?
SetStyle(System.Windows.Forms.ControlStyles.Selectable,true)
2.
/* 這裡需回傳true, 否則無法接收到方向鍵
3.
* MSDN:
4.
* Call the IsInputKey method to determine whether the key specified by the keyData
5.
* parameter is an input key that the control wants.
6.
* This method is called during window message preprocessing to determine whether
7.
* the specified input key should be preprocessed or sent directly to the control.
8.
* If IsInputKey returns true, the specified key is sent directly to the control.
9.
* If IsInputKey returns false, the specified key is preprocessed and only sent to
10.
* the control if it is not consumed by the preprocessing phase.
11.
* Keys that are preprocessed include the TAB, RETURN, ESCAPE, and the UP ARROW,
12.
* DOWN ARROW, LEFT ARROW, and RIGHT ARROW keys. */
13.
return true;
14.
}