FoxPro Tutorial & Source Code
* Author : Team of Pelagian Softwares * Date : 08/10/2007 * Source : pass.prg * Description : Simple Password Program
* usage: paste this code, where you want to ask for password * or call with do pass
set talk off do whil .t. @ 08, 24 clea to 14, 55 DOUB @ 08, 24 TO 14, 55 DOUB @ 10, 27 SAY "Please Enter Your Passward" @ 12, 36 say spac(8) colo '/w' @ 12, 35 SAY " " a=0 x=inkey() pw='' do whil !a=8 x=inkey() IF X = 0 loop EndIf if x=27 close all release all set colo to set stat on Clear ReTurn EndIf if x=13 exit EndIf if x=127 if a=0 ??chr(7) EndIf if !A=0 a=a-1 q12=len(pw) pw=left(pw,q12-1) @ 12, 36+A say " " colo '/w' EndIf EndIf if !x=127 pw=pw+chr(x) @ 12,36+A say "*" colo '/w' a=a+1 EndIf EndDo pw=padr(pw,8) if pw = 'hello ' EXIT ELSE save scre set colo to @ 12, 36 SAY repl("*",8) colo '/w' ??chr(7) @ 04, 22 to 07, 56 doub @ 05, 23 say " WRONG PASSWARD PLEASE TRY AGAIN " colo "/w" @ 06, 28 say " Press To Exit! " colo "/w" do whil inkey()=0 EndDo rest scre EndIf EndDo ** start your program from here clear ?"welcome to Pelagian Softwares" ? ? ?"Author: Rishi Acharya"
Also download:
|
Category for FoxPro Database Financial Mathametics Screen Search Security Sound String
|