设置Textbox的keydown事件代码为:
Dim btn As WinForm.Button = e.Form.Controls("Button1")If e.KeyCode = Keys.Enter Then btn.PerformClick()End If