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
How to restore Windows 7 Home Premium?
Exchange 2010 Spam Handling Hub Transport Server
replace field value with another value using MS TSQL
There isn't enough memory to perform this operation
Set break on unhandled errors in Microsoft Options window in Access 2003
Does waiting for a web service's reponse use "clock cycles"?
Web Service to upload images
SBS 2003 Error - Windows could not start because of an error in the software. Please report this problem as : load needed DLLs for kernel.
Unable to remove buritos.exe trojan from UPS email
File Conversion window opens when I try open a Word .doc