WebBrowser.StatusText Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene il testo dello stato del WebBrowser controllo.
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
Valore della proprietà
Testo dello stato.
- Attributi
Eccezioni
Questa WebBrowser istanza non è più valida.
Impossibile recuperare un riferimento a un'implementazione dell'interfaccia IWebBrowser2 dal controllo ActiveX WebBrowser sottostante.
Esempio
Nell'esempio di codice seguente viene illustrato come usare la proprietà webBrowser1 e un StatusBar controllo denominato StatusBar1.
Per l'esempio di codice completo, vedere Come aggiungere funzionalità del Web browser a un'applicazione 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
Commenti
È possibile utilizzare questa proprietà per visualizzare lo stato del WebBrowser controllo in una barra di stato. Il testo dello stato è un messaggio che contiene informazioni quali l'URL di un collegamento ipertestuale quando il puntatore del mouse passa il puntatore del mouse su di esso e l'URL del documento attualmente in fase di caricamento. Gestire l'evento StatusTextChanged per aggiornare la barra di stato quando viene modificato il valore della StatusText proprietà.