0

I'm printing the screen of the winform page.

I click print, then the "select printer" page shows up, i select the "save to pdf" and click Print. The "Print to Pdf" window appears, but it stays on the back of the winform.

How can i bring to front this window "Print to Pdf" screenshot?

Ps : This is a simple GUI, and the print page is the systems default.

  • Is minimizing your WinForms form or sending it to back can help you? – amitklein May 11 '21 at 08:29
  • I dont want the Winform minimised, but just to have the "Print to Pdf" pop out on the front of the Winform. – blackwolf511 May 11 '21 at 18:48
  • then this should help you https://stackoverflow.com/questions/49822314/bring-another-application-to-front – amitklein May 11 '21 at 20:18
  • It somehow helped on the fact that on click, i can call an external application, but still no luck. The print page is the system default which after selecting the printer, calls "splwow64.exe" which stays on background. – blackwolf511 May 12 '21 at 08:44
  • Can't you call the exe by yourself? – amitklein May 12 '21 at 10:49
  • I did it, but no screen shows up. It seems that this is a sub process which is called after the select printer page. – blackwolf511 May 12 '21 at 13:36
  • You can try to change the `TopMost` property to `false` (this is the opposite to this https://stackoverflow.com/a/11526579) – amitklein May 12 '21 at 18:06

1 Answers1

0

The solution that worked for me is:

From the Winform i deleted :

PrintPreviewDialog1 and PrintDocument1_Print

then reinserted them from the toolbox.

Somehow, this solved the problem and brought the "print page" to the front.