石井景都

Generation

generate functionMon, 17 Apr 2023

dialogで指定したPDFファイルを指定

void printPdf(string fileName) { ProcessStartInfo info = new ProcessStartInfo(); info.Verb = "print"; info.FileName = fileName; info.CreateNoWindow = true; info.WindowStyle = ProcessWindowStyle.Hidden; Process p = new Process(); p.StartInfo = info; p.Start(); p.WaitForInputIdle(); System.Threading.Thread.Sleep(3000); if (false == p.CloseMainWindow()) p.Kill(); }

Questions about programming?Chat with your personal AI assistant