WebBrowser.StatusText プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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 コントロールのステータス バーを実装する方法を示します。 この例では、フォームに 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
注釈
このプロパティを使用すると、ステータス バーに WebBrowser コントロールの状態を表示できます。 状態テキストは、マウス ポインターをポイントしたときのハイパーリンクの URL や、現在読み込まれているドキュメントの URL などの情報を含むメッセージです。 StatusText プロパティの値が変更されたときにステータス バーを更新するには、StatusTextChanged イベントを処理します。