Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STRTRANS and Slashes
Message
 
À
10/12/2007 17:08:10
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01274617
Message ID:
01274625
Vues:
9
Jay,

Those two slashes must be together, like '\\' and there should be not more than those two? If that is true, maybe you could do the work in KeyPress instead, something like
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 and nShiftAltCtrl = 0
				Dodefault(nKeyCode, nShiftAltCtrl)
			endif
		endif
	
	endproc
	
enddefine
This way you are even saving keystrokes to the user <g> (Not completely sure if it is free of side efects)
"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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform