Thanks to Amit for
alerting me to the fact that my backspace solution didn't work for the mouse event.
Turns out that the solution is still simple but involves using KeyPress aswell as Valid.
Simply add a new property (eg bAllowBackspace) to your textbox baseclass and then throw the follow code in KeyPress and Valid events
KeyPress()
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 127 AND
This.SelStart < 1
This.bAllowBackspace = .F.
ENDIF
* other code etc
Valid()
IF This.bAllowBackspace = .F.
This.bAllowBackspace = .T.
RETURN .F.
ENDIF
* other code etc