0
工作
我试图写一个简单的功能带来的Internet Explorer窗口到前台,然后按F5使用DLL函数以刷新:刷新IE窗口不自动在VB.Net
Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Integer) As Integer
然后使用以下函数调用此函数:
SetForegroundWindow(processID.MainWindowHandle.ToInt32)
SendKeys.Send("{F5}")
但是,当我试图调试代码时,setforeground不起作用。
我使用Windows 2008(64位),所以我想我应该使用ToInt64。但是,这似乎也没有做到这一点,当我打电话给SetForegroundWindow,似乎没有出现。
有没有其他建议?我正在使用VS 2008.
很多thnaks!