我如何使用空格标签 [英] how can i use space tab

查看:91
本文介绍了我如何使用空格标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Windows窗体之一中,我使用了一个名为打印"的按钮.当我单击此按钮时,它将打印请求的数据.为了避免鼠标单击,我将空格键用作打印选项.为此,我将代码用作:

In one of my windows forms, I have used one button named "print". When I click this button, it will print the requested data. To avoid mouse clicks, I have used the space tab as the print option. For that I used the code as:

if (e.KeyCode == Keys.Space)
{
  button1.PerformClick();
}



它将起作用,但是我的问题是,当我输入带空格的名称时,它将显示打印选项.如何避免此错误?



It will work, but my problem is that when I type name with space it will display the printing option. How can I avoid this mistake?

推荐答案

为什么要尝试使用空格"选项卡(任何垂直的原因).使用CTRL + P(通常每次使用)键进行打印...
Why you are trying to use Space tab(any perticular reasons). Use CTRL + P(Normally every one use) Key for Printing...


更好地使用CTRL + P进行打印.因为每个人都只是这样做.
如果您只想使用空间,
试试这个,
Better you use CTRL + P for Printing. Because everybody is doing this only.
If u want to use space only means,
Try this,
if (e.KeyCode == Keys.Space && button1.Focus == true)
{
  button1.PerformClick();
}


这篇关于我如何使用空格标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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