WebBrowserArray.Navigated 事件

定義

發生於 WebBrowser 控制項已巡覽至新文件且已開始載入新文件時。Occurs when the WebBrowser control has navigated to a new document and has begun loading it.

public:
 event System::Windows::Forms::WebBrowserNavigatedEventHandler ^ Navigated;
public event System.Windows.Forms.WebBrowserNavigatedEventHandler Navigated;
member this.Navigated : System.Windows.Forms.WebBrowserNavigatedEventHandler 
Public Event Navigated As WebBrowserNavigatedEventHandler 

備註

每當設定下列其中一個屬性或呼叫方法時,WebBrowser 控制項會流覽至新的檔:The WebBrowser control navigates to a new document whenever one of the following properties is set or methods is called:

處理 Navigated 事件,以在 WebBrowser 控制項流覽至新檔時接收通知。Handle the Navigated event to receive notification when the WebBrowser control has navigated to a new document. 當發生 Navigated 事件時,新檔已開始載入,這表示您可以透過 DocumentDocumentTextDocumentStream 屬性來存取已載入的內容。When the Navigated event occurs, the new document has begun loading, which means you can access the loaded content through the Document, DocumentText, and DocumentStream properties. 處理 DocumentCompleted 事件,以在 WebBrowser 控制項完成載入新檔時收到通知。Handle the DocumentCompleted event to receive notification when the WebBrowser control finishes loading the new document.

您也可以藉由處理 Navigating 事件的方式,在導覽開始之前收到通知。You can also receive notification before navigation starts by handling the Navigating event. 如果未符合某些條件,則處理此事件可讓您取消導覽,例如,使用者尚未填寫表單。Handling this event lets you cancel navigation if certain conditions have not been met, for example, the user has not filled out a form.

如需如何處理事件的詳細資訊,請參閱處理和引發事件For more information about how to handle events, see Handling and Raising Events.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.

適用於