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
Make Table Query but save it in a New Database
How to get the Drop down items of a ToolStripDropDownButton to remain open.
System.Web.Caching.Cache Error - Object not set to an instance of an object???
Can a property be added to each property in a collection class
Accessing Program files in Vista?
SQL Server file proportions
Exchange 2010 After install when initialising it looks for the DC not the member server
Programmatically setting folder/file permission for sharing folders
using Parameters.AddWithValue populated by QueryStringField
Format Number to Show without comma for thousands place