Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TForm1.Button1Click(Sender: TObject);
var
strFilename : String;
strErrorMsg : String;
begin
strFilename := edit1.text;
if not fileExists( strFilename )
then
begin
beep();
strErrorMsg := 'Can''t find a file named "' +
strFilename + '"' + #10#10 +
'Please check your filename. ';
application.MessageBox( pChar( strErrorMsg ),
'Can''t Print', MB_ICONSTOP + MB_OK );
end
else
with tRichEdit.createParented( self.Handle ) do
try
lines.loadFromFile( strFileName );
print( 'Printout caption' );
finally
free;
end;
end;