[programming] Re: TIniFile problem in D3

  • From: Joshua Brannon <jbrannon@xxxxxxx>
  • To: "programming@xxxxxxxxxxxxx" <programming@xxxxxxxxxxxxx>
  • Date: Tue, 2 Oct 2001 9:39:8 -0600

>Did you create it in the first place? Please provide the code, so we can
>have a look to see what's wrong.

Here it is :
(I've declared
var AcrobatPath, GhostscriptPath : String;
      CloseOnSave : Boolean;)
***********************************
procedure TForm1.FormShow(Sender: TObject);
var ConfigFile : TIniFile;
begin
with ConfigFile.Create(ChangeFileExt(ParamStr(0),'.INI')) do
 try
  begin
   IF ConfigFile.ReadBool('Config','FirstTime',True) = False THEN
    begin
     Form1.Visible := False;
     Form2.Visible := True;
    end
   ELSE
    begin
     AcrobatPath := ConfigFile.ReadString('Config','AcrobatPath','');
     GhostscriptPath := ConfigFile.ReadString('Config','GhostscriptPath','');
     CloseOnSave := ConfigFile.ReadBool('Config','CloseOnSave',false);
       IF SaveDialog1.Execute THEN
        IF SaveDialog1.FileName <> ''  THEN
         Form1.Caption := SaveDialog1.FileName;
    end;
  end
 finally
  ConfigFile.Free;
 end;
end;

To unsubscribe, send a message to programming-request@xxxxxxxxxxxxx with the 
words "unsubscribe"  (without quotes) in the subject feild.  OR visit 
//freelists.org/

Other related posts: