loForm = Createobject('myForm') loForm.Show(1) define class myForm as Form add object myTextBox as Textbox procedure myTextBox.KeyPress(nKeyCode, nShiftAltCtrl) nodefault if nKeyCode # 92 or At('\', this.Value) = 0 Dodefault(nKeyCode, nShiftAltCtrl) if ((nKeyCode = 92) or (nKeyCode = 127 and substr(this.Value, this.SelStart, 1) == '\' and substr(this.Value, this.SelStart - 1, 2) # '\\')) and nShiftAltCtrl = 0 Dodefault(nKeyCode, nShiftAltCtrl) endif endif endproc enddefine[Update] By the way, I realize that you can still press DEL or select text and then overwrite/delete, but do not feel like adding more code, after all this might not even be what Jay needs, maybe I completely misunderstood him.