| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Allows for hidden Get input for character strings.
GetSecret( <cInit> , ;
[<nRow>] , ;
[<nCol>] , ;
[<lSay>] , ;
[<cSay>] ) --> cString
The function returns the edited value as a character string.
GetSecret() is a simplified Get routine for hidden input. The user can edit a character string as in a regular Get field, but the characters are not displayed on the screen. Instead, each character is represented by an aserisk (*). This allows for comfortable input of a password, for example.
| See also: | @...GET |
| Category: | CT:GetSys , Get system |
| Source: | ct\getsecrt.prg |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example shows a typical scenario for GetSecret().
// The user must enter a password which is not displayed on
// the screen
PROCEDURE Main
LOCAL cPassword := Space(20)
CLS
SET CONFIRM ON
cPassWord := ;
GetSecret( cPassword, 10, 10, .T., "Enter your password: ")
IF cPassWord <> "xHarbour"
Alert( "Access denied" )
QUIT
ENDIF
Alert( "Access granted" )
RETURN
http://www.xHarbour.com