all groups > dotnet myservices > november 2004 >
You're in the

dotnet myservices

group:

Printing Service-Help


Printing Service-Help Sunny
11/5/2004 5:43:54 PM
dotnet myservices:
Hi
I am trying to a print service in .net , that will monitor a folder and pick
files in RTF format and print to the default printer.

Is it possible to do with .Net?. Can any let me know the namespaces
available in .Net.

Thanks
Venkat

Re: Printing Service-Help SenthilVel
11/23/2004 5:54:35 PM
Hi you can print RTF's .

the name space which supports this is: System.Diagnostics;

Here is the code:

using System.Diagnostics;



public ProcessStartInfo PintObj = new ProcessStartInfo();

Use the following code in a seperate function and call where needed..

PintObj .Verb ="print";

// You can keep the printsize as required by yu...

PintObj .WindowStyle=ProcessWindowStyle.Maximized;

// CHange the File needed by yu to print....

PintObj .FileName= "D:/Print.txt"; //(chenge yur Print file name )

PintObj .UseShellExecute =true;

Process.Start(PintObj );

Hope this Helps...

Thanks

Senthil









[quoted text, click to view]

AddThis Social Bookmark Button