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
Save unbound combobox column value in Access 2007
replaced sbs 2003 server, netlogon 5513 errors
Transaction log shipping from SQL 2000 to 2005 - Issue with Database upgrade required
Free Busy information not available to 2007 Outlook clients
SQL Select problem...need records with "best match" returned in order
Generic path to open a file from VBA
Operations Manager Top 10 Memory Consumers
Is there a way of inserting hyphens (-) into all of the existing phone numbers contained in my Outlook 2007 contacts list? So the format will be 123-456-7890 instead of 1234567890
Exchange 2010 coexistence with Exchange 2003
Help Access Expression Syntax