How to have Refresh2 method with .net WebBrowser control?
I have vb6 project that uses Refresh2 method开发者_如何学运维 of WebBrowser. How I can access this method in .net project?
The WebBrowser control in WinForms has two Refresh methods:
public void Refresh();
public void Refresh(WebBrowserRefreshOption opt);
The second one in fact calls Refresh2()
on the underlying COM component. Just pass in the enum value that you want, depending on the refresh options that you want.
Recommend re-writing WebBrowserRefreshOption opt to any ieRefreshConstants enum such as
Refresh2(ieRefreshConstants.REFRESH_COMPLETELY);
where
enum ieRefreshConstants {
REFRESH_NORMAL = 0,
REFRESH_IFEXPIRED = 1,
REFRESH_COMPLETELY = 3
};
According to MSDN http://msdn.microsoft.com/en-us/library/aa768363(v=vs.85).aspx
精彩评论