HtmlWindow.AttachEventHandler(String, EventHandler) Metodo
Definizione
Aggiunge un gestore eventi per l'evento HTML DOM specificato.Adds an event handler for the named HTML DOM event.
public:
void AttachEventHandler(System::String ^ eventName, EventHandler ^ eventHandler);
public void AttachEventHandler (string eventName, EventHandler eventHandler);
member this.AttachEventHandler : string * EventHandler -> unit
Public Sub AttachEventHandler (eventName As String, eventHandler As EventHandler)
Parametri
- eventName
- String
Nome dell'evento da gestire.The name of the event you want to handle.
- eventHandler
- EventHandler
Riferimento al codice gestito che gestisce l'evento.A reference to the managed code that handles the event.
Commenti
Non è consigliabile alleghi un evento a un documento HTML o a uno dei relativi oggetti fino al completamento del caricamento del documento.You should not attach an event to an HTML document or one of its objects until the document has completed loading. Il primo che è necessario chiamare questo metodo è nell' DocumentCompleted evento del WebBrowser controllo.The earliest you should call this method is in the DocumentCompleted event of the WebBrowser control.