Microsoft
Software
Hardware
Network
Question : ToolStrip textbox focus.
Dear All Experts,
in my form, i have toolstrip with combobox1 and textbox1. in my scenario when i select combobox1 then textbox1 will get focus. this is my code:
Private Sub cboSearchBy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboSearchBy.Click
If Asc(e.KeyChar) = Keys.Enter Then
txtSearch.Focus()
e.Handled = True
End If
End Sub
this code given me an error:
'KeyChar' is not a member of 'system.eventArgs.'
Any help please, i used VB.Net 2005
Best Regards,
Beginning VB.Net
Answer : ToolStrip textbox focus.
Why are you dealing with key characters in a combo box handler? Usually one clicks on a combo box with the mouse, and you seem to be using the MouseClick event. Just remove the If statement and you should be all set.
Random Solutions
C# -- Microsoft Report (.rdlc) textbox "HEIGHT" ?
Stored Procedure Fails To Populate Recordset
How to input form data into table or query
Internet explorer crashes
Unable to RDP into Windows 2003 SBS after reboot
SQL - Dates syntax ( VB6 connecting to SQL Server database)
Sum column in datagrid
Uneccessary Programs/ addons ...things that take up internet bandwidth that can be removed.
MS Access Macro Auto Select Both Combo Box and Text Box at Same time in Same form
how to pull week day and time from a query