在vb.net中创建enter键按事件 [英] Create enter key press event in vb.net

查看:625
本文介绍了在vb.net中创建enter键按事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个datagridview。如果我在网格中编辑列并按回车键,那么我想在该按键上生成代码。

I have one datagridview. If I edit Columns in grid and press enter key then I want to generate code on that keypress.

推荐答案



DataGridView:使Enter键移动到下一列 [ ^ ]

========================================== ======

将表格''的Keypreview属性更改为true

并写下以下代码 -



Hi,
DataGridView: Make Enter Key Move to Next Column[^]
================================================
Change form''s Keypreview property to true
and write the following code-

If e.KeyCode = Keys.Enter Then
          'Code to execute
      End If 


If Asc(e.KeyChar) = 13 Then
          'Code to execute
      End If


这篇关于在vb.net中创建enter键按事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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