c#窗体应用程序我的保存对话框隐藏在我的窗体后面。如何使保存对话框弹出顶部

编程入门 行业动态 更新时间:2024-10-23 16:19:57
本文介绍了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#窗体应用程序我的保存对话框隐藏在我的窗体后面。如何使保存对话框弹出顶部

本文发布于:2023-11-06 13:38:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563839.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:窗体   对话框   弹出   应用程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!