Re: Printing Problem



On 28 Mar, 18:18, Jim Higgins <inva...@xxxxxxxxxxxxxxx> wrote:

.............
uses Dos;
{$M 8192,0,0}
procedure PrintFile (Filename : string);
begin
SwapVectors;
Exec(getenv('COMSPEC'),'/C notePAD.exe /p '+Filename);{}
SwapVectors;
end;

will do the trick. Alternatively for a larger file you can use
wordpad, but you need START to call that program

exec(getenv('COMSPEC'),'/C start WORDPAD.exe /p '+filename);
=======

Under XP you need to ensure that DosOnly has been remmed out of
Config.NT (or the custom Config if there is one).

Also it may need SetMemTop(HeapPtr) before the Exec and
SetMemTop(HeapEnd) after.
SetMemTop is normally in BP\RTL\TV\MEMORY.PAS

Bob

.



Relevant Pages

  • Re: file class
    ... private String _FileName; ... /// filename and all reqired parameters must be set up by user ... public TextFileServer(string FileName, int FixedRecordLen) ... //End of line built from constructor or user manual ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: file class
    ... private String _FileName; ... /// filename and all reqired parameters must be set up by user ... public TextFileServer(string FileName, int FixedRecordLen) ... //End of line built from constructor or user manual ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: unbuffered file IO?
    ... private String _FileName; ... /// filename and all reqired parameters must be set up by user ... public TextFileServer(string FileName, int FixedRecordLen) ... //End of line built from constructor or user manual ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: file class
    ... private String _FileName; ... /// filename and all reqired parameters must be set up by user ... public TextFileServer(string FileName, int FixedRecordLen) ... //End of line built from constructor or user manual ...
    (microsoft.public.dotnet.languages.csharp)
  • file class
    ... private String _FileName; ... /// filename and all reqired parameters must be set up by user ... public TextFileServer(string FileName, int FixedRecordLen) ... //End of line built from constructor or user manual ...
    (microsoft.public.dotnet.languages.csharp)