How do you detect when the CTRL is pressed in the RichTextBox
Posted on 2005-03-18
I have a RichTextBox in my C# application, and I want to do something similar to what the IDE does when it recognizes a class name and pops up a list box of possible properties/methods/events for you to choose from. I want to be able to detect when the user presses the CTRL (or any other modifier) key in a RichTextBox and pop up a list of items for them to choose from. KeyPress and KeyDown do not get called when a modifier is pressed. ModifiedChanged doesn't work either. How can I detect when the CTRL is pressed in this control? Also, if you have any advice on popping up a list box, I'd appreciate hearing it. Thanks!