|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to capture enter key without affrecting copy paste kcust keysIf I were to capture enter key on keyup event of an GUI object like comboBox
box, How do I avoid killing ctrol-c, controlv, controlx, shift-insert, shiftdelete, contrl-insert GS schrieb:
> If I were to capture enter key on keyup event of an GUI object like comboBox Hi,> box, How do I avoid killing ctrol-c, controlv, controlx, shift-insert, > shiftdelete, contrl-insert Unfortunately, I don't know what's the problem: When I capture the [Enter]-key of a textbox, the ctrl and shift still works... I haven't tested it with a ComboBox but I think it should work there, too. Could you specify your problem a little more, please? Thanks, Norman it is just that in my combobox, control-c , control-v, control-x are
ignored, the Shift-delete... etc are ignored My code for capturing the return key in a combobox is Private Sub addressBar_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles addressBar.KeyUp If (e.KeyCode = Keys.Return) Then .... my code for processing return key end if end sub I just did no deal with other keys and I guess that could be my problem I could still do copy, cut, paste via mouse but not with keyboard Show quoteHide quote "Norman Chong" <normanch***@freenet.de> wrote in message news:1163068980.541784.111200@k70g2000cwa.googlegroups.com... > > GS schrieb: > > > If I were to capture enter key on keyup event of an GUI object like comboBox > > box, How do I avoid killing ctrol-c, controlv, controlx, shift-insert, > > shiftdelete, contrl-insert > > Hi, > > Unfortunately, I don't know what's the problem: When I capture the > [Enter]-key of a textbox, the ctrl and shift still works... I haven't > tested it with a ComboBox but I think it should work there, too. > Could you specify your problem a little more, please? > > Thanks, > Norman > GS schrieb:
> it is just that in my combobox, control-c , control-v, control-x are Strange problem... When I use the KeyUp-Event of a ComboBox and react> ignored, the Shift-delete... etc are ignored > to [Return], other keys aren't affected - Everything works fine?!? I'm sure that you don't have to react to other keys within the event - When you just do something when pressing [Return], the functionality ofother keys won't be deleted, so this is not the problem. Do you catch [Ctrl]-X or [Shift]-X somewhere else in your code? Can you write text into the ComboBox or are the other keys ignored, too? Is it possible that the code within your KeyUp-Event has something to do with this problem? Does this problem appear with other controls (Or in another application)? Does the problem appear when using simple test-code within the KeyUp-Event (e.g. just showing a MessageBox)? Does the problem appear when working on a different system? Stupid questions, I know. But I don't have any idea why this happens - So it might be a good idea to get a little closer to the source of the problem \ to the root of all evil ;-)
Learning OOP conceptual question
File Aging Program Iterating through a Hastable of objects Problem Adding and Using Resource Files update database through SQL script convert idl to c# or tlb code collapsing in vb.net 2005 Find a control on a form of a specific name Passing values to another web page Re-size label text |
|||||||||||||||||||||||