WebBrowser.StatusTextChanged Zdarzenie

Definicja

Występuje, gdy StatusText wartość właściwości ulegnie zmianie.

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 

Typ zdarzenia

Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano, jak używać procedury obsługi dla StatusTextChanged zdarzenia w celu zaimplementowania paska stanu dla WebBrowser kontrolki podobnej do tej w programie Internet Explorer. Ten przykład wymaga, aby formularz zawierał kontrolkę WebBrowser o nazwie webBrowser1 i kontrolkę StatusBar o nazwie StatusBar1.

Pełny przykład kodu można znaleźć w temacie How to: Add Web Browser Capabilities to a Windows Forms Application (Instrukcje: dodawanie funkcji przeglądarki internetowej do aplikacji Windows Forms).

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

Uwagi

Obsłuż to zdarzenie, aby zaktualizować pasek stanu po zmianie wartości StatusText właściwości.

Aby uzyskać więcej informacji na temat obsługi zdarzeń, zobacz Obsługa i podnoszenie zdarzeń.

Dotyczy

Zobacz też