Friday, October 5, 2007

How to do programming with the OpenDialog

How to do programming with the OpenDialog

To do programming with the OpenDialog

Step 1

To do programming with the OpenDialog, first, you need to double click the Open File button.

Step 2

After that, it will display a Code Explore window and you just need to enter the programming inside it.

Step 3

Program:

procedure TForm1.FileOpenClick(Sender: TObject);

begin

with OpenDialog1 do

if Execute then

Begin

Memo1.Lines.LoadFromFile(FileName);

Caption:='Open the File'

+ExtractFilename(FileName);

End;

end;

end.

No comments: