>On a form, I have a richtext box and a set of button to format the text.
>
>When the user types fast, the buttons sometimes get activated. It's like the box looses focus: the b that they type in the box becomes the hotkey that triggers the Bold button.
>
>How can I prevent that from happening.
Philippe,
Can you provide more details? It's not clear how typing into richtextbox can trigger button click event.
You can also consider moving you buttons from the form to a toolbar. It also will have positive sideeffect because clicking on the toolbar button doesn't switch focus to it.
--sb--