>Hi,
>
>>you can code in the rightclick event of the command button
>
>thanks for your reply, but the RightClick event fires too late (after When and GotFocus), so I can't refuse to get the focus there.
>
>Armin
You can move focus to another object on the form.
I don't think, your original idea is achievable... How would you prevent user from clicking and right-clicking whatever he/she pleases? You can probably cover your button with transparent shape and pass click but not right-click...
Anyway, why you should prevent button from getting focus, if user right clicks on it?
If it's not broken, fix it until it is.
My Blog