capturing combination of key pressed

  • Thread starter Thread starter veena
  • Start date Start date
V

veena

hello,
i have got a problem of how to capture two keys when
pressed together i.e in my task i require certain action
to be performed when the ctrl and 'A' keys are pressed
together i.e i need to perform some action when entire
text is selected.
how can i approach this problem of capturing the combined
keys pressed any help is appreciated.

regards

---veena
 
Your form needs to have keypreview enabled firstly..

Then your form must trap the KeyUp event. In the handler, you can then do the following...

If (((e.KeyData & Keys.A) == Keys.A) && (e.Control)

// Do your CTRL + A code here....


Hope that helps you....
 
Back
Top