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
Outlook problem with error 0x80040154 (and others) -- inetcomm issue?
Can I have command box labeled email and have it only open up the installed .pdf printer
visual studio addin deploy for 2005 and 2008
Full Screen
Help installing VS .NET 2005 Crystal Reports on web server
Global Error Handling - winform
Service is not saving the start parameter
The database has been placed in a state by user admin on XXX that prevents it from being opened or locked
Connect VB6 to SQL 2008
VB me.controls function