Not sure what is the problem here, I have few combo boxes which
drop down style is DropDown,
AutoCompleteMode is SuggestAppend
AutoCompleteSource is ListItems
Though I explicitly move the focus to other field, the ComboBox text is still in blue background and white text.
What is happening here?
Sample code:
Code:Private Sub cboPrograma_KeyDown(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyEventArgs) Handles cboPrograma.KeyDown Dim KeyCode As Short = eventArgs.KeyCode Dim Shift As Short = eventArgs.KeyData \ &H10000 If KeyCode = Keys.Left Then meOtsek.Focus() End If End Sub Private Sub cboPrograma_GotFocus(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboPrograma.GotFocus cboPrograma.SelectAll() End Sub Private Sub cboPrograma_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboPrograma.KeyUp If e.KeyCode = Keys.Left Or e.KeyCode = Keys.Right Then e.Handled = False ElseIf Convert.ToInt32(cboPrograma.Text) > 0 or Convert.ToInt32(cboPrograma.Text) < 4 Then meDen.Focus() End If End Sub Private Sub cboPrograma_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboPrograma.SelectedIndexChanged obrazecZaVnesRef.programa = vbNetUtilsDZS.convertToPositiveInteger(cboPrograma.Text) End Sub




Reply With Quote
