แก้ไข

แชร์ผ่าน


WebBrowser.StatusTextChanged Event

Definition

Occurs when the StatusText property value changes.

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 

Event Type

Attributes

Examples

The following code example demonstrates how to use a handler for the StatusTextChanged event to implement a status bar for the WebBrowser control similar to the one in Internet Explorer. This example requires that your form contains a WebBrowser control called webBrowser1 and a StatusBar control called StatusBar1.

For the complete code example, see How to: Add Web Browser Capabilities to a Windows Forms Application.

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

Remarks

Handle this event to update a status bar when the value of the StatusText property changes.

For more information about handling events, see Handling and Raising Events.

Applies to

See also