开发者

How can the Open/Save/Cancel dialog be disabled in a C# .NET application Webbrowser?

When downloadable content/server side scripts give the .NET Webbrowser a downloadable file, a dialog box is opened prompting the user to open/save/cancel the download. How can this window be prevented from appearin开发者_如何学运维g/ be disabled?

Thanks in advance.

Note: This is for a custom download manager in a browser I am building.


To take over downloading you need to implement IDownloadManager.

To register your download manager for a webbrowser control instance, you need to implement IServiceProvider on your IOleClientSite implementation and return your download manager when SID_SDownloadManager service is requested.

An example can be found at http://www.codeproject.com/KB/miscctrl/csEXWB.aspx. It is unclear which UI class library you are using, but you can use it in Windows Forms directly or in WPF via Windows Forms Interop.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜