WebBrowser.StatusText プロパティ

定義

WebBrowser コントロールの状態テキストを取得します。

public:
 virtual property System::String ^ StatusText { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public virtual string StatusText { get; }
[<System.ComponentModel.Browsable(false)>]
member this.StatusText : string
Public Overridable ReadOnly Property StatusText As String

プロパティ値

状態テキスト。

属性

例外

この WebBrowser インスタンスは無効です。

IWebBrowser2 インターフェイスの実装への参照を、基になる ActiveX WebBrowser コントロールから取得できませんでした。

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

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

// 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

注釈

このプロパティを使用すると、ステータス バーに WebBrowser コントロールの状態を表示できます。 状態テキストは、マウス ポインターをポイントしたときのハイパーリンクの URL や、現在読み込まれているドキュメントの URL などの情報を含むメッセージです。 StatusTextChanged プロパティの値が変更されたときにステータス バーを更新するには、StatusText イベントを処理します。

適用対象

こちらもご覧ください