InputStr Function
Allows Input of a String in a Dialog with given Caption and Prompt.

Unit
QESBPCSMsgs

Declaration
Function InputStr(const Caption, Prompt: string; var S: string): Boolean;

Description
If the user Cancels, then the function returns False. Ensures Default Cursor is displayed, preserves state of cursor.

Parameters
Caption Info to Display at the top of the Dialog.
Prompt Info to Display to the left of the Input Field.
Input & Output Value to be displayed & edited.

Returns
True if Ok is Clicked, False if Cancel is Clicked

Category
Routines that produce Dialogs

Implementation

function InputStr (const Caption, Prompt: string;
     var S: string): Boolean;
var
     Hold: TCursor;
begin
     Hold := Screen.Cursor;
     Screen.Cursor := crDefault;
     try
          Result := InputQuery (Caption, Prompt, S);
     finally
          Screen.Cursor := Hold;
     end;
End;


HTML generated by Time2HELP
http://www.time2help.com