大家好,我得到這個錯誤時,試圖顯示打印預覽對話框顯示一個模式對話框或形成當應用程序不UserInteractive模式
PrintPreviewDialog ppdlg = new PrintPreviewDialog();
ppdlg.ShowDialog();
如何解決時,我的網站在現場運行這個錯誤
完全錯誤
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
消息說這一切:你試圖顯示一個窗口服務的對話框,它本質上是非交互式的。簡短的答案是,你不能。 –