gpt4 book ai didi

c# - 无法对 PrintDialog 中止使用react

转载 作者:太空宇宙 更新时间:2023-11-03 13:50:02 25 4
gpt4 key购买 nike

我有一份报告,想打印它。目前我正在使用:

myreport.PrintDialog()

如果我在 Windows PrintDialog 上单击“中止”,报告将在标准打印机上打印。我该如何处理这个中止?我只想在 OK 上打印,但我无法处理 DialogResult

最佳答案

你有过这样的经历吗?

PrintDialog dialog = new PrintDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
// do your printing process here
}

关于c# - 无法对 PrintDialog 中止使用react,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13952901/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com