Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Masking a password
Message
From
05/07/2002 16:03:44
 
 
To
05/07/2002 05:57:32
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00675544
Message ID:
00675756
Views:
19
Here is how we do it in FPD26:
		*---Get Password
		hideword = ""
		password = ""
		mkey     = ""


		DO WHILE .T.
			hideword = LEFT(hideword+SPACE(8),8)
			@  2,22 GET hideword PICTURE "XXXXXXXX"
			CLEAR GETS
			hideword = RTRIM(hideword)
			
			mkey = INKEY(0,"H")
			
			DO CASE
			CASE mkey < 0
				LOOP
			CASE mkey = 13 .OR. mkey = 10
				EXIT
			CASE mkey = 27
				*---IF [Esc] was hit start over
				producer = "   "
				EXIT
			CASE mkey = 127
				*---BACKSPACE
				IF LEN(password) > 1
					hideword = LEFT(hideword,LEN(hideword)-1)
					password = LEFT(password,LEN(password)-1)
				ELSE
					hideword = ""
					password = ""
				ENDIF
			OTHERWISE
				hideword = hideword + "*"
				password = password + CHR(mkey)
			ENDCASE
		ENDDO
wait WINDOW hideword
wait WINDOW password
>Hi all,
>A quick one: in VFP it is easy to mask a password.
>Any idea of how to do the same in a text box in FPW26?
>Thanks in advance
>Jonathan
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform