c# cannot hide acrobat reader as external program

  • Thread starter Chus Chuscazo via .NET 247
  • Start date
C

Chus Chuscazo via .NET 247

Hi there!
I am building fdf files and i need to print them out.
The problem is that in order to print them i have to executeacrobat reader.
I am fine with it, but the problem is that i cannot hide thereader application, it always stays in the bottom bar.
The code i'm doing is the following:

string f_fdf = @"C:\PROJECTSdotNET\PDF_XML_PDF\PDFtoXML\chus.fdf";
Process p = new Process();
p.StartInfo.Arguments = " /h ";
p.StartInfo.FileName = f_fdf;
p.StartInfo.Verb = "Print";
p.StartInfo.CreateNoWindow = true;
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();

The result is the same if I take out the "Arguments bit", or the"CreatenoWindow" or even the "windowstyle". Has anyone got anyidea why that is happening? Because everywhere the solutions isalways "CreateNoWindow=true" but it's not working to me. Isbecause of Acrobat reader?
I am using Windows XP.
Thank you very much in advance.

Chus
 
J

Jochen Kalmbach

Chus said:
The result is the same if I take out the "Arguments bit", or the
"CreatenoWindow" or even the "windowstyle". Has anyone got any idea
why that is happening? Because everywhere the solutions is always
"CreateNoWindow=true" but it's not working to me. Is because of
Acrobat reader? I am using Windows XP.

This feature MUST be supported by the starting app. If the app always want
to show his window he can do this... and just ignore the STARTUPTINFO.

You can try to find the window handle and then call Win32-Api "ShowWindow"
with SW_HIDE


--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top