private void openChildForm(PDFPreviewM f) { Screen s = null; Screen[] argScreen = Screen.AllScreens; if (argScreen.Length > 1) { s = argScreen[1]; } else { s = argScreen[0]; } f.StartPosition = FormStartPosition.Manual; f.Location = s.Bounds.Location; f.ShowDialog(); f.Dispose(); }
private void changePreview() { PDFPreviewM frm9 = null; if (frm9 == null || frm9.IsDisposed) { //string path = (strPdfPath + "_" + gridMitsu[1, gridMitsu.CurrentRow.Index].Value).ToString() + ".pdf"; string path = (strPdfPath + "_" + gridMitsu[1, gridMitsu.CurrentRow.Index].Value).ToString() + "_M.pdf"; if (System.IO.File.Exists(path)) { if (gridMitsu.Rows.Count > 0) { int intRowIdx = gridMitsu.CurrentRow.Index; frm9 = null; frm9 = new PDFPreviewM(this, path); openChildForm(frm9); } } } }