loadPage("https://www.google.com.tw")
'WebBrowser的Anchor屬性,將WebBrowser的上下左右距離固定住!!自動縮放大小
WebBrowser1.Anchor = (System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right Or System.Windows.Forms.AnchorStyles.Bottom)
End Sub
Private Sub loadPage(URL As String)
WebBrowser1.ScriptErrorsSuppressed = True '抑制Script錯誤訊息
WebBrowser1.Navigate(URL)
' 等待網頁讀取完成
Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop
End Sub