PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

PDF document opens behind windows!
http://forum.pdfsharp.com/viewtopic.php?f=2&t=3990
Page 1 of 1

Author:  Rocky48 [ Wed Jul 03, 2019 9:05 pm ]
Post subject:  PDF document opens behind windows!

I have nearly completed my project and I have 2 problems
1) The adobe reader window opens behind the forms in my program. Is there a way to get it to open TopMost like I can in VB.

2) If Adobe is open and you click the print button again, the program freezes. Is there a way to prevent this?

Author:  TH-Soft [ Thu Jul 04, 2019 7:03 am ]
Post subject:  Re: PDF document opens behind windows!

Hi!

Welcome to the PDFsharp forum.

Maybe someone can help with your Adobe Reader questions.

Author:  Rocky48 [ Mon Jul 15, 2019 7:15 pm ]
Post subject:  Re: PDF document opens behind windows!

I thought of a way to make sure that the windows form does not overlay the Adobe Acrobat window:
I added after the Process.Start command, a form close command [close()].
This still has the risk that a user may forget to close the adobe reader, which will clrash the program. :cry:

Author:  Rocky48 [ Thu Jul 18, 2019 12:20 pm ]
Post subject:  Re: PDF document opens behind windows!

The exception states that the filename is being used by another process, in other words the verse.pdf file is still open in Acrobat.
Tried a couple of things:
1) Tried a For Next loop to add a number to the verse.pdf, but the loop iterated all the range before opening the Acrobat reader, even though I put the next before the Close command.
2) Tried Exit Sub but still had an open process.

In the FPDF that I use on my website it automatically updates the filename with e.g. verse(1).pdf.

Any other ideas on how to eliminate this problem

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/