Code:
if len(pword$)>0 then x=pos locate , x-1 : print " "; locate , x-1 pword$=left$(pword$, len(pword$)-1) else beep end if
[This message has been edited by Kim Peck (edited October 10, 2003).]
if len(pword$)>0 then x=pos locate , x-1 : print " "; locate , x-1 pword$=left$(pword$, len(pword$)-1) else beep end if
x=pos locate , x-1 : print " "; locate , x-1 pword$=left$(pword$, len(pword$)-1)
x=pos locate , x-1 : print " "; locate , x-1 pword$=left$(pword$, len(pword$)-1)
h = 0 pword$ = "" do while instat=0 'other processing here as needed wend an$ = inkey$ h = asc(an$) if h = 13 or h = 27 then exit loop 'Cr or ESC if h = 8 then 'Backspace 'backspace code needed here end if if h > 31 and h < 128 then 'printable only pword$ = pword$ + an$ print;"*"; end if loop
REM ******************************************************************************** REM * Hidden Text Input Example Code * REM * This code is released to the Public Domain * REM ******************************************************************************** $DIM ALL DECLARE FUNCTION GetHiddenInput( BYVAL STRING, BYVAL STRING ) AS STRING DIM sText AS STRING CLS LET sText = GetHiddenInput( "Enter text: ", "*" ) PRINT PRINT "You entered the string " + CHR$( 34 ) + sText + CHR$( 34 ) END FUNCTION GetHiddenInput( _ BYVAL sPrompt AS STRING, _ BYVAL sHiddenChar AS STRING ) PRIVATE AS STRING DIM sChar AS STRING DIM sInput AS STRING 'Display prompt PRINT sPrompt; LOCATE , , 1 'Process input LET sChar = INKEY$ WHILE sChar <> CHR$( 13 ) IF LEN( sChar ) > 0 THEN SELECT CASE sChar CASE CHR$( 8 ) IF LEN( sInput ) > 0 THEN LET sInput = LEFT$( sInput, LEN( sInput ) - 1 ) LOCATE , LEN( sPrompt ) + 1, 0 PRINT STRING$( LEN( sInput ) * LEN( sHiddenChar ), sHiddenChar ) + SPACE$( LEN( sHiddenChar ) ); LOCATE , LEN( sPrompt ) + 1 + ( LEN( sInput ) * LEN( sHiddenChar ) ), 1 ELSE BEEP END IF CASE ELSE LET sInput = sInput + sChar PRINT STRING$( LEN( sHiddenChar ), sHiddenChar ); END SELECT END IF LET sChar = INKEY$ WEND FUNCTION = sInput END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: