By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,571 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,571 IT Pros & Developers. It's quick & easy.

how to capture enter key without affrecting copy paste kcust keys

P: n/a
GS
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
Nov 9 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

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

Nov 9 '06 #2

P: n/a
GS
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
"Norman Chong" <no*********@freenet.dewrote in message
news:11**********************@k70g2000cwa.googlegr oups.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

Nov 10 '06 #3

P: n/a
GS schrieb:
it is just that in my combobox, control-c , control-v, control-x are
ignored, the Shift-delete... etc are ignored
Strange problem... When I use the KeyUp-Event of a ComboBox and react
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 ;-)

Nov 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.