C#.net的快捷键 [英] shortcut keys for C# .net

查看:93
本文介绍了C#.net的快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#.net 2008和sql server 2005创建一个项目.在我的应用程序中,我使用鼠标单击进行打印,移至网络位置,进行插入等.我不想使用鼠标单击来使用键盘按键以上功能.如何在代码中实现它们?请给我一个解决方案.

I am creating a project using C# .net 2008 and sql server 2005. In my application I am using mouse clicks for printing, moves to net location, inserting etc.. Instead of using mouse clicks I want to use keyboard keys for the above functions. How can I implement them in code? Please give me a solution.

推荐答案

使用MenuStrip控件并为您的选项创建菜单,并根据需要提供快捷键.
否则,请使用Form-KeyUp/KeyPress事件,并手动获取键代码或键值.

注意:如果您要进行第二个选项检查,则是否已启用true表单属性 KeyPreview = true
Use MenuStrip control and create menus for your options and give shortcut keys as like you want..

or else use Form - KeyUp/KeyPress event(s) and get key code or key value to do it manuly.

Note: if you go for second option check wether you are enabled true the Form Property KeyPreview = true


这篇关于C#.net的快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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