title: Cancel Button in Inputbox doesn't close
body: <p>I am using an inputbox on a click of a button  to store a value and perform some validations on the same. My problem is on click of cancel button it doesn't close and instead popups out information for a null check. Any help is appreciated. Thanks   </p>
  
  <p>For a null check it pops out "please enter a value and try again".<br>
  The problem is even if i click on cancel it shows the same message like "please enter a value and try again" and when i dont provide any value and click on ok it shows the same message "please enter a value and try again"</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var inputValue:string;
  begin
    repeat
      inputValue:=InputBox('Enter a value', 'value','');
      if (inputValue&lt;&gt;'') then
      begin
        if MessageDlg('Do You want to enter this value ' +inputValue+'?',mtInformation,[mbYes,mbNo],0)= mrYes then
          MessageDlg('Your Value got stored', mtInformation,[mbOk],0)
      end;
    until(inputValue='');
  
    repeat
      if (inputValue = '') then
        MessageDlg('Please Enter a value and try again', mtInformation,[mbOk],0) ;
      inputValue:=InputBox('Enter a value', 'value','');
      if (inputValue&lt;&gt;'') then
      begin
        if MessageDlg('Do You want to enter this value ' +inputValue+'?',mtInformation,[mbYes,mbNo],0)= mrYes then
          MessageDlg('Your Value got stored', mtInformation,[mbOk],0)
      end;
    until (inputValue&lt;&gt;'') ;
  end;
  </code></pre>