开发者

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

开发者 https://www.devze.com 2023-04-11 20:11 出处:网络
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

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

精彩评论

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

关注公众号