c#窗体应用程序我的保存对话框隐藏在我的窗体后面。如何使保存对话框弹出顶部 [英] c# window form application My save dialog is hidden behind my form. how to make the save dialog pop up at the top

查看:95
本文介绍了c#窗体应用程序我的保存对话框隐藏在我的窗体后面。如何使保存对话框弹出顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!程序运行完成后,我发现我的保存对话框隐藏在我的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#窗体应用程序我的保存对话框隐藏在我的窗体后面。如何使保存对话框弹出顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆