23 lines
577 B
VB.net
23 lines
577 B
VB.net
Public Class MyCmb
|
|
|
|
Dim NC As Control = Nothing
|
|
Private Sub MyCmb_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
|
|
If e.KeyCode = Keys.Enter Then
|
|
If Me.NC Is Nothing Then
|
|
SendKeys.Send("{TAB}")
|
|
Else
|
|
NC.Focus()
|
|
End If
|
|
End If
|
|
End Sub
|
|
Public Property NectControl() As Control
|
|
Get
|
|
Return NC
|
|
End Get
|
|
Set(ByVal value As Control)
|
|
NC = value
|
|
End Set
|
|
End Property
|
|
|
|
End Class
|