Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STRTRANS and Slashes
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01274617
Message ID:
01274632
Views:
9
Naomi,

Yes, that is true. This is a revised version <g>
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 nShiftAltCtrl = 0
				Dodefault(nKeyCode, nShiftAltCtrl)
			endif
		endif

	endproc

enddefine
[Update] Mmm, it needs more refinement... does not work well
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform