隐藏网络下载进度 [英] Hide network download progress

查看:77
本文介绍了隐藏网络下载进度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使Excel 2010自动从.NET 4代码中打开(只读,隐藏,非交互)一系列工作簿。我扫描工作簿数据以查找某些信息,并使用非Excel方法将其保存在其他位置。该应用程序正常工作,但
是一个用户界面问题:只要从
网络位置加载大型工作簿,就会弹出下面的对话框(我修改了外观)稍微隐藏一些机密信息):

I'm automating Excel 2010 to open (read-only, hidden, non-interactive) a series of workbooks from my .NET 4 code. I scan the workbook data looking for some information, and save that elsewhere using non-Excel means. The application works correctly, but there is a user interface problem: the dialog below pops up whenever a large workbook is loaded from a network location (I've modified the appearance slightly to hide some confidential information):

我已经尝试了很多方法来防止这个对话框出现,因为用户可能在后台运行我的应用程序,我不希望他意外地点击取消按钮(实际上会发生这种情况)。我将excel.Interactive设置为false,将excel.DisplayAlerts
设置为false,但没有效果。同样,用户永远不会看到Excel,这个对话框也不应该。

I've tried many methods to keep this dialog from appearing because the user may be running my application in the background and I don't want him hitting that Cancel button accidentally (WHICH DOES ACTUALLY HAPPEN). I've set excel.Interactive to false, excel.DisplayAlerts to false with no effect. Again, Excel is never visible to the user and this dialog should not be either.

建议?

Paul T。

推荐答案

我相信使用Windows API,您可以枚举所有打开的窗口,从类或标题中确定哪个是下载窗口。然后获取该窗口的句柄并将其Visible属性设置为false。

I believe with the Windows API, you can enumerate all of the open windows, determine from the class or caption, which is the Downloading window. Then get a handle on that window and set it's Visible property to false.

遗憾的是窗口无法最小化....

It's a shame that window cannot be minimized....


这篇关于隐藏网络下载进度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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