1, create a new form as form1
2, find the DIALOGS\OPENDIALOG place it to this form1
3, click on the opendialog1 to look at its properties in the Object Inspector...set the
3.a, FILTER to acceptable filefilter (example:
pascal | *.pas)
3.b, DEFAULTEXT to
*.pas
3.c, TITLE to
search for pascal file (*.pas)
4, place an edit box as edit1
5, place a button to the form1 too ,as button1,and code it.
set the button1's caption to
search or
browse,and double click it to write some code..
procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.Execute then begin
edit1.Text:= opendialog1.filename;
end;
end;
when the file opened the file's path and name is entered to the edit1