M
Michael Smith
Hi,
I am using the following code to print documents directly
to the default printer
**************
ProcessStartInfo startInfo = new ProcessStartInfo
("<someprogram>.exe");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
startInfo.FileName = filename;
startInfo.Verb = "Print";
Process.Start(startInfo);
**************
the code successfully launches and prints the program,
but the window is not always minimized. I did a few
tests and found out that the window will only minimize if
I manually quit the launched program after each
execution. If the program is left running, or if it is
already running, the window will not be minimized. The
same is true for ProcessWindowStyle.Hidden. is there a
way to make the window stay minimized/hidden all the
time?
Also, certain programs only print the first page (i.e.
Windows Journal). Is there a way to send these programs
the message to pring all pages? or do I have to find
another way to print them?
Thank you in advance.
-michael
I am using the following code to print documents directly
to the default printer
**************
ProcessStartInfo startInfo = new ProcessStartInfo
("<someprogram>.exe");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
startInfo.FileName = filename;
startInfo.Verb = "Print";
Process.Start(startInfo);
**************
the code successfully launches and prints the program,
but the window is not always minimized. I did a few
tests and found out that the window will only minimize if
I manually quit the launched program after each
execution. If the program is left running, or if it is
already running, the window will not be minimized. The
same is true for ProcessWindowStyle.Hidden. is there a
way to make the window stay minimized/hidden all the
time?
Also, certain programs only print the first page (i.e.
Windows Journal). Is there a way to send these programs
the message to pring all pages? or do I have to find
another way to print them?
Thank you in advance.
-michael