From 107d16f70b17b88889b1f84bac045f876ff7d255 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 16 Nov 2018 20:09:52 +0000 Subject: [PATCH] B2018-147 Added Try/Catch, a static Boolean, and a message box to trap and inform user how to set the pdf viewer so that it creates separate processes for the two PDF documents that are being compared. --- PROMS/Baseline/frmBaseline.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/PROMS/Baseline/frmBaseline.cs b/PROMS/Baseline/frmBaseline.cs index 7c7f89e1..d634f138 100644 --- a/PROMS/Baseline/frmBaseline.cs +++ b/PROMS/Baseline/frmBaseline.cs @@ -1319,9 +1319,23 @@ namespace Baseline X = x; Y = y; } + private static Boolean FoxitSettingInfo = true; + + /// + /// MoveIt() moves the window containing the PDF viewer to the right so the two pdf viewer windows will not overlap. + /// public void MoveIt() { - SetWindowPos(Process.MainWindowHandle, 0, X, Y, 200, 400, SWP_NOSIZE | SWP_SHOWWINDOW | SWP_NOZORDER); + try + { + SetWindowPos(Process.MainWindowHandle, 0, X, Y, 200, 400, SWP_NOSIZE | SWP_SHOWWINDOW | SWP_NOZORDER); + } + catch // B2018-147 bring up message to inform user of the setting that will create separate windows of the pdf viewer + { + if (FoxitSettingInfo) + MessageBox.Show("If you want to see the documents in separate windows,\nyou need to set Foxit to allow multiple instances. \nSelect File | preferences | Documents\n Check the Allow Multiple Instances", "Foxit Settings"); + FoxitSettingInfo = false; + } } } public class ProcessLocationQueue: Queue