WebBrowser.GoForward メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As WebBrowser Dim returnValue As Boolean returnValue = instance.GoForward
ナビゲーションに成功する場合は true。ナビゲーション履歴に次のページがない場合は false。

WebBrowser コントロールは、ブラウジング セッション時に閲覧したすべての Web ページの履歴リストを保持します。GoForward メソッドを使用して Internet Explorer の [進む] ボタンのようなボタンを実装できます。ユーザーはナビゲーション履歴の前のページに戻った後で、このボタンを使って次のページに進むことができます。
ナビゲーション履歴を利用できるかどうか、そして現在のページの後にページがあるかどうかを判断するには、CanGoForward プロパティを使用します。CanGoForwardChanged イベントを処理して、CanGoForward プロパティの値が変更されたときに通知を受け取ります。たとえば、WebBrowser コントロールでナビゲーション履歴の最後のページに移動したとき、またはそのページから移動したときに [進む] ボタンの有効状態を変更する場合に、このイベントが役立ちます。

GoForward メソッドを使用して、Internet Explorer の [進む] ボタンのようなボタンを WebBrowser コントロールに実装する方法を次のコード例に示します。この例は、フォームに webBrowser1 という名前の WebBrowser コントロールと、ButtonForward という名前の Button コントロールが存在することを前提にしています。
コード全体については、「方法 : Windows フォーム アプリケーションに Web ブラウザの機能を追加する」を参照してください。
' Navigates webBrowser1 to the next page in history. Private Sub forwardButton_Click( _ ByVal sender As Object, ByVal e As EventArgs) _ Handles forwardButton.Click webBrowser1.GoForward() End Sub ' Disables the Forward button at the end of navigation history. Private Sub webBrowser1_CanGoForwardChanged( _ ByVal sender As Object, ByVal e As EventArgs) _ Handles webBrowser1.CanGoForwardChanged forwardButton.Enabled = webBrowser1.CanGoForward End Sub
// Navigates webBrowser1 to the next page in history. private void forwardButton_Click(object sender, EventArgs e) { webBrowser1.GoForward(); } // Disables the Forward button at the end of navigation history. private void webBrowser1_CanGoForwardChanged(object sender, EventArgs e) { forwardButton.Enabled = webBrowser1.CanGoForward; }
// Navigates WebBrowser1 to the next page in history. void ButtonForward_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ ) { this->WebBrowser1->GoForward(); } // Disables the Forward button at the end of navigation history. void WebBrowser1_CanGoForwardChanged( System::Object^ /*sender*/, System::EventArgs^ /*e*/ ) { this->ButtonForward->Enabled = this->WebBrowser1->CanGoForward; }


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebBrowser クラス
WebBrowser メンバ
System.Windows.Forms 名前空間
CanGoForward
CanGoForwardChanged
GoBack
GoHome
GoSearch
Refresh
Stop
Weblioに収録されているすべての辞書からWebBrowser.GoForward メソッドを検索する場合は、下記のリンクをクリックしてください。

- WebBrowser.GoForward メソッドのページへのリンク