次の方法で共有


WebBrowser.StatusTextChanged イベント

定義

StatusText プロパティ値が変更されたときに発生します。

public:
 event EventHandler ^ StatusTextChanged;
[System.ComponentModel.Browsable(false)]
public event EventHandler StatusTextChanged;
[System.ComponentModel.Browsable(false)]
public event EventHandler? StatusTextChanged;
[<System.ComponentModel.Browsable(false)>]
member this.StatusTextChanged : EventHandler 
Public Custom Event StatusTextChanged As EventHandler 
Public Event StatusTextChanged As EventHandler 

イベントの種類

属性

次のコード例では、 StatusTextChanged イベントのハンドラーを使用して、Internet Explorer と同様の WebBrowser コントロールのステータス バーを実装する方法を示します。 この例では、フォームに webBrowser1 と呼ばれるWebBrowser コントロールと、StatusBar1 というStatusBar コントロールが含まれている必要があります。

完全なコード例については、「 方法: Windows フォーム アプリケーションに Web ブラウザー機能を追加する」を参照してください。

// Updates StatusBar1 with the current browser status text.
void WebBrowser1_StatusTextChanged( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   this->StatusBar1->Text = WebBrowser1->StatusText;
}
// Updates the status bar with the current browser status text.
private void webBrowser1_StatusTextChanged(object sender, EventArgs e)
{
    toolStripStatusLabel1.Text = webBrowser1.StatusText;
}
' Updates the status bar with the current browser status text.
Private Sub webBrowser1_StatusTextChanged( _
    ByVal sender As Object, ByVal e As EventArgs) _
    Handles webBrowser1.StatusTextChanged

    toolStripStatusLabel1.Text = webBrowser1.StatusText

End Sub

注釈

StatusText プロパティの値が変更されたときにステータス バーを更新するには、このイベントを処理します。

イベントの処理の詳細については、「処理とイベントの発生」を参照してください。

適用対象

こちらもご覧ください