大家好!程序运行完成后,我发现我的保存对话框隐藏在我的Form1后面。我必须最小化所有内容,然后单击Form1任务栏,以显示保存对话框。为什么会这样?我试过了:
Topmost = true
Show();
Focus();
但所有这些都不会使保存对话框出现在第一个顶部。为什么会这样?
我的程序是调用excel函数,当它结束时,我会将destinationworkbook.Close(defaultArg, defaultArg,defaultArg);如果我什么都不做,保存对话框将显示在顶部。但由于该程序运行2-3分钟,用户可能想要浏览互联网或其他东西,这将导致保存对话框出现在Form1后面。
我想要的是,当程序运行完成后,弹出的保存对话框将显示在顶部,它用于通知用户程序运行完成。
感谢任何帮助:D
解决方案
如果在应用程序结束时Excel显示对话框,则可能会在执行前隐藏您的表单(使用 Hide()) destinationworkbook.Close()
hi guys! After my program run finished, i found out my save dialog is hidden behind my Form1. i had to minimise everything then click on the Form1 taskbar, for the save dialog to appear. Why isit so? i tried:
Topmost = true
Show();
Focus();
But all this doesnt make the save dialog appear at the first top. Why isit so?
My program is to call for excel function, and when it end, i would destinationworkbook.Close(defaultArg, defaultArg, defaultArg); If i dont do anything, the save dialog will appear at the top. But because the program run 2-3 mins, the user may want to browse internet or other stuff and it would cause the save dialog to appear behind Form1.
What i desire is, when the program run finish, the save dialog pop up will appear at the top, it serve to notify the user the program run finished.
Appreciate any help :D
解决方案If the dialog is displayed by Excel at the end of your application, then maybe hide your form (using Hide()) before executing destinationworkbook.Close().
更多推荐
c#窗体应用程序我的保存对话框隐藏在我的窗体后面。如何使保存对话框弹出顶部
发布评论