procedure TForm1.mnuOpenClick(Sender: TObject);
begin
if OpenDialog1.Execute then begin
Form1.Caption := OpenDialog1.FileName;
Memo1.Lines.LoadFromFile
(OpenDialog1.FileName);
Memo1.SelStart := 0;
end;
end;