>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 >>