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使用して、インターネット エクスプローラーと同様のコントロールのステータス バーWebBrowserを実装する方法を示します。 この例では、フォームに というコントロールと というコントロールwebBrowser1StatusBarStatusBar1含まれているWebBrowser必要があります。

完全なコード例については、「方法: 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

注釈

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

適用対象

こちらもご覧ください