保存后的文件框在不同应用程序之间切换时隐藏。 [英] Save filedialog box is hiding while switching between different applications.

查看:79
本文介绍了保存后的文件框在不同应用程序之间切换时隐藏。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个基于Windows窗体的应用程序,它是用VB.Net开发的。我试图从数据库导出数据到excel文件。在导出按钮单击事件,从数据库获取数据后,使用保存文件对话框代码保存文件。



从数据库中获取数据将需要几分钟如果我在我的应用程序和其他打开的应用程序之间切换,保存文件对话框将被隐藏,当我返回到我的应用程序但在任务管理器窗口中显示时,它不可见。



如何以编程方式返回我的应用程序后如何关注保存文件对话框?



提前感谢您的支持。

Hi,

I have an Windows forms based application which is developed in VB.Net. In which I am trying to export data into excel file from the database. On Export button click event, After getting the data from the database, code using Save File Dialog box for saving the file.

Fetching data from the database will take few minutes and if i switch between my application and other opened applications, the Save file dialog box is going hidden and is not visible when i am returning to my application but is showing in the task manager window.

How can I get the focus on Save File dialog box after returning to my application programmatically?

Thanks in advance for your support.

推荐答案

我这样做就像准备excel一样,在显示另存为daialog框之前,我通过使用
$来激活我的应用程序中的当前表单b $ b
I have done this like as soon as preparing the excel and before showing the save as daialog box, I am activaitng the current form in my application by using
Me.Activate() 



方法,它返回到屏幕顶部显示应用程序和另存为对话框。这解决了我的问题。


method and it returns to the application and save as dialog box is showing on the top of the screen. This solved my issue somehow.


这篇关于保存后的文件框在不同应用程序之间切换时隐藏。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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