title: Delphi 2007 - Allowing a Read-only file to be selected in a TSaveDialog
body: <p>I have a need for a user to be able to select an existing read-only file from a save dialog.  I thought you could do this with a judicious selection of the <code>TSaveDialog</code>  options but I can't make it happen.  If I select a R/O file, as soon as I hit the <code>Save</code> button I get the message:</p>
  
  <pre><code>    Read-only.txt
      This file is set to read-only.
      Try again with a different file name.
  </code></pre>
  
  <p>I imagined the option bit <code>ofNoReadOnlyReturn</code> would control this, but it seems to have no effect.</p>
  
  <p>What am I missing?</p>
  
  <pre><code>program Project1;
  
  uses
    Forms,
    Unit1 in 'Unit1.pas' {Form1};
  
  {$R *.res}
  
  begin
    Application.Initialize;
    Application.MainFormOnTaskbar := True;
    Application.CreateForm(TForm1, Form1);
    Application.Run;
  end.
  </code></pre>
  
  <p>-</p>
  
  <pre><code>unit Unit1;
  
  interface
  
  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls;
  
  type
    TForm1 = class(TForm)
      SaveDialog1: TSaveDialog;
      Button1: TButton;
      procedure Button1Click(Sender: TObject);
    private
      { Private declarations }
    public
      { Public declarations }
    end;
  
  var
    Form1: TForm1;
  
  implementation
  
  {$R *.dfm}
  
  procedure TForm1.Button1Click(Sender: TObject);
  begin
  if SaveDialog1.Execute then
      begin
      Windows.Beep (1000, 300) ;
      end ;
  end ;
  
  end.
  </code></pre>
  
  <p>-</p>
  
  <pre><code>object Form1: TForm1
    Left = 0
    Top = 0
    Caption = 'Form1'
    ClientHeight = 69
    ClientWidth = 195
    Color = clBtnFace
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    OldCreateOrder = False
    PixelsPerInch = 96
    TextHeight = 13
    object Button1: TButton
      Left = 56
      Top = 18
      Width = 75
      Height = 25
      Caption = 'Button1'
      TabOrder = 0
      OnClick = Button1Click
    end
    object SaveDialog1: TSaveDialog
      FileName = 'Read-only.txt'
      InitialDir = 'C:\Users\Ross\Documents\RAD Studio\Projects'
      Options = [ofHideReadOnly, ofNoReadOnlyReturn, ofEnableSizing]
      Left = 16
      Top = 16
    end
  end
  </code></pre>