procedure TForm1.Button1Click(Sender: TObject);
var T:TINIfile;
begin
T.Create('c:\test.ini');
if InputBox('Input Box', 'Prompt', '1') <>'1' then
T.WriteString('Section','Key','string maybe get from inputbox');
end;
Use the InputBox function when there is a default value that should be used when the user chooses the Cancel button (or presses Esc) to exit the dialog. If the application needs to know whether the user chooses OK or Cancel, use the InputQuery function instead.
-----
delphi的文档说你这种情况用InputQuery。