0

我在 C# 中使用带有 Watin 和 IE8 的 FileUpload。我不想在我的屏幕上看到任何东西。所以,我用

Settings.Instance.MakeNewIeInstanceVisible = false;

除了我的 FileUpload 对话框之外,一切都被隐藏了。即使我的浏览器实例被隐藏,此对话框也会出现在顶部。有人建议隐藏这个吗?

谢谢 !

4

2 回答 2

0

I fixed this problem with another function ,you just set Url,save path and all works add this in class

[DllImport("urlmon.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern Int32 URLDownloadToFile(Int32 pCaller, string szURL, string szFileName, Int32 dwReserved, Int32 lpfnCB);  

and this function

 int lwhdr = URLDownloadToFile(0, Link, FilePath, 0, 0);
于 2014-05-21T09:23:00.937 回答
0

也许这会有所帮助(未选中),当您初始化浏览器时设置此属性:

browser.ShowWindow(NativeMethods.WindowShowStyle.ShowMinimized);
于 2013-01-27T08:55:56.937 回答