CryptoSys PKI Pro Manual

Pwd.Prompt Method

Open a dialog box to receive a password with user-supplied prompt.

Syntax

[C#]
public static string Prompt(
   int maxChars,
   string caption,
   string prompt = "" 
)
[VB]
Public Shared Function Prompt (
   maxChars As Integer,
   caption As String,
   Optional prompt As String = "" 
) As String

Parameters

maxChars  Int32
Maximum characters expected in password
caption  String
Caption for dialog window
prompt  String  (Optional)
Wording for prompt (optional, default="Enter password:")

Return Value

String
String containing password or Empty string if user cancels

Example

string s = Pwd.Prompt(32, "My caption for the dialog here", "My new prompt:");
Console.WriteLine("Password=[{0}]", s);  // Demo only!

See Also

VB6/C equivalent: PWD_Prompt

[Contents] [Index]

[PREV: Prf.Bytes Method...]   [Contents]   [Index]   
   [NEXT: Rng.Bytes(Int32) Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.