全局代码
Public Sub textBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Enter
sender.parent.Controls("FindNext").PerformClick
End If
End Sub
计划管理
Dim frm = Windows.forms.Form.ActiveForm
If frm IsNot Nothing Then
If frm.name = "Class108" Then
Dim ContentFind As windows.Forms.ComboBox = frm.controls("ContentFind")
removehandler ContentFind.Keydown, addressof textbox1_keydown
addhandler ContentFind.Keydown, addressof textbox1_keydown
End If
End If