- Impact
- 56
I'm trying to create a visual basic program that will refresh a browser url in internet explorer after the page gets done loading. Here is my code:
When i try to build the application I get errors
Error 1 Type 'InternetExplorer' is not defined. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 4 25 WindowsApplication1
Error 2 'READYSTATE_COMPLETE' is not declared. It may be inaccessible due to its protection level. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 8 38 WindowsApplication1
I referenced Microsoft Internet Controls so I don't know what i'm doing wrong?
Public Class Form1
Public Sub RefreshPage()
Dim page As New InternetExplorer
page.Navigate("www.google.com")
page.Visible = True
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
page.Refresh()
End Sub
End Class
When i try to build the application I get errors
Error 1 Type 'InternetExplorer' is not defined. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 4 25 WindowsApplication1
Error 2 'READYSTATE_COMPLETE' is not declared. It may be inaccessible due to its protection level. C:\Users\Admin\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 8 38 WindowsApplication1
I referenced Microsoft Internet Controls so I don't know what i'm doing wrong?