在vb.net中实现窗体上回车键代替TAB键,用如下方法: 首先设置窗体的 KeyPreview 属性为true 然后加入以下代码: Private Sub FrmLogin_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress '用回车代替Tab If e.KeyChar = Chr(13) Then e.Handled = True
'Author:wgscd '功能:抓屏 'QQ153964481 'Date:2005-4-12 '********************************* Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows 窗体设计器生成的代码 " Public Sub New() MyBase.New() '该调用是 Windows 窗体设计器所