Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a IToolControl derived control which contains a c# TextBox. In the IToolControl::OnSetFocus function documentation, it states that you need to call ICompletionNotify::SetComplete() when it's finished to let the application know that the control should lose focus.

On another IToolControl ComboBox control, I called the SetComplete() function on the DropDownClosed event.

On which TextBox event should I call ICompletionNotify.SetComplete()?

share|improve this question
up vote 1 down vote accepted

I guess an appropriate moment to call ICompletionNotify.SetComplete for a TextBox would be upon the user hitting the Enter key. That could be handled by subscribing to the KeyDown event and checking whether the KeyCode in event arguments equals to Keys.Enter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.