>My clients press ENTER to navigate through a form. Checkbox causes a problem here,
> as it's value changes on pressing ENTER key. I will need to use Y/N textbox instead.
> I have not subclasses the checkbox and it has already been implemented in the project.
Behold the wonders of subclassing!
>Is there a way to change the behaviour of Checkbox all over the project in one go?
You can do it at a form level:
1) Set each form's KeyPreview property to True.
2) add this code to each form's KeyPress event:
lparameters nKeyCode, nShiftAltCtrl
if nKeyCode = 13 and this.activecontrol.class = "Checkbox"
* Suppress enter's default behaviour..
nodefault
* .. but move to next control
keyboard '{tab}' plain
endif