Show input dialog box

Posted in Forms

Call InputBox function to bring up an input dialog box ready for the user to enter a string in its edit box.

procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Caption:=InputBox('Question', 'Enter string', 'Default');
end;