|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
keydown event not working problemon a control, keydown was never triggered
Private Sub addressBar_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) .... end sub on the hand the following got executed Private Sub addressBar_textchanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles addressBar.TextChanged wasUrlTyped = True setStatus("address changed") End Sub BTW the adressbar1 is a combobox do I have initialize something first? GS,
I did not look at your code, however because it is mostly the situation that the KeyUp will work, can you probably try that one first. Cor Show quoteHide quote "GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schreef in bericht news:O5Dwwpd6GHA.4304@TK2MSFTNGP03.phx.gbl... > on a control, keydown was never triggered > Private Sub addressBar_KeyDown(ByVal sender As Object, ByVal e As > System.Windows.Forms.KeyEventArgs) > ... > end sub > > on the hand the following got executed > > Private Sub addressBar_textchanged(ByVal sender As Object, ByVal e As > System.EventArgs) Handles addressBar.TextChanged > wasUrlTyped = True > setStatus("address changed") > End Sub > > BTW the adressbar1 is a combobox > > do I have initialize something first? > > GS wrote:
Show quoteHide quote > on a control, keydown was never triggered If this is your actual code, notice that there is a difference between> Private Sub addressBar_KeyDown(ByVal sender As Object, ByVal e As > System.Windows.Forms.KeyEventArgs) > ... > end sub > > on the hand the following got executed > > Private Sub addressBar_textchanged(ByVal sender As Object, ByVal e As > System.EventArgs) Handles addressBar.TextChanged > wasUrlTyped = True > setStatus("address changed") > End Sub > the two event handlers you posted. The TextChanged event has a Handles keyword at the end of it wheras the KeyDown you posted does not.
Read legacy vb5 files with variant declare in vb.net
Running an Access macro from a VB.NETprogram need help on optional arg ADOX add bool field Overlapping controls How to determen the object ? WEB combobox won't fire event Redrawing on GDI+ clicking on a DataGridView's DataSource property throws exception in designer Set Focus to textbox on tab control |
|||||||||||||||||||||||