При запуске возникает проблема: ошибка invalid filename
Код:
procedure TForm1.Button1Click(Sender: TObject);
var onebyte:byte; i, count:integer;
begin
if OpenDialog1.Execute then
AssignFile(F,opendialog1.filename);
Reset(F);
while not eof(f) do
begin
blockread(f,onebyte,1, count);
showmessage(inttostr(onebyte));
end;
end;
Ошибку выдает в строке while not eof(f)