Skip to main content

Hi All,

Im trying to print a file I've already created call c:\\tmp\\NeilTest.prn directly to a printer using Visual Cobol, is there a clever .NET way of doing this?

I found below but not sure if this is the best way or if it would work in VC?

http://stackoverflow.com/questions/4435644/how-to-print-batch-file-in-vb-net

Many thanks

Neil.

Hi All,

Im trying to print a file I've already created call c:\\tmp\\NeilTest.prn directly to a printer using Visual Cobol, is there a clever .NET way of doing this?

I found below but not sure if this is the best way or if it would work in VC?

http://stackoverflow.com/questions/4435644/how-to-print-batch-file-in-vb-net

Many thanks

Neil.

There are many ways of printing in .NET. I believe that our knowledgebase contains several samples.

The simplest method of sending an existing file to the printer is probably by using the PC_PRINT_FILE routine which is part of the standard MF library.


Hi All,

Im trying to print a file I've already created call c:\\tmp\\NeilTest.prn directly to a printer using Visual Cobol, is there a clever .NET way of doing this?

I found below but not sure if this is the best way or if it would work in VC?

http://stackoverflow.com/questions/4435644/how-to-print-batch-file-in-vb-net

Many thanks

Neil.

is PC_PRINT_FILE native code? if so ive been advised not to use that as all my projects are fully managed .net. i really need a .NET way of doing this, if such a thing exists.


Hi All,

Im trying to print a file I've already created call c:\\tmp\\NeilTest.prn directly to a printer using Visual Cobol, is there a clever .NET way of doing this?

I found below but not sure if this is the best way or if it would work in VC?

http://stackoverflow.com/questions/4435644/how-to-print-batch-file-in-vb-net

Many thanks

Neil.

There is a managed version of PC_PRINT_FILE that will be called when you are using managed code. If you are using native code then the native version will be called.