Results 1 to 1 of 1

Thread: WindowsService problem *UPDATED*

  1. #1

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159

    WindowsService problem *UPDATED*

    Hi,

    I have created a service (solved last problem) but now have a different problem.

    My application is intended to scan a directory for PDF files, and if one is created display the PDF to the screen by calling the windows association (as below);

    Code:
    private void fileSystemWatcher1_Created(object sender, System.IO.FileSystemEventArgs e) {
    ProcessStartInfo psi = new ProcessStartInfo();
    psi.CreateNoWindow = false;
    psi.FileName = fileSystemWatcher1.Path + "\\" + e.Name.ToString();
    psi.RedirectStandardOutput
    psi.ErrorDialog = true;
    psi.UseShellExecute = true;
    psi.WindowStyle = ProcessWindowStyle.Normal;
    		
    System.Diagnostics.Process p = new System.Diagnostics.Process();
    p.StartInfo = psi;
    p.Start();
    }
    I know that this code works (tested in a normal app); however because I have created this as a service, the Acrobat.exe program that is executed by the code above is hidden (or certainly it is running but not displayed on the screen).

    Does anybody know a way around this? I have searched through the System.Diagnostics.Process members and also the ProcessStartInfo members and can find nothing!

    Please please can somebody help me!

    Regards,
    DJ
    Last edited by DJ_Catboy; Aug 15th, 2003 at 04:48 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width