Share via


Interfaccia WindowEventArgs

fornisce informazioni per ActivateEvent, Deactivatee WindowSize eventi.

Spazio dei nomi:  Microsoft.Office.Tools.Word
Assembly:   Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Sintassi

'Dichiarazione
<GuidAttribute("767d9ec0-c72c-4f66-892b-be4a4b20eba3")> _
Public Interface WindowEventArgs
[GuidAttribute("767d9ec0-c72c-4f66-892b-be4a4b20eba3")]
public interface WindowEventArgs

Il tipo WindowEventArgs espone i seguenti membri.

Proprietà

  Nome Descrizione
Proprietà pubblica Window Ottiene la finestra da agita su da ActivateEvent, Deactivatee WindowSize metodi.

In alto

Esempi

Nell'esempio di codice seguente viene creato un gestore eventi per WindowSize evento.Le visualizzazioni del gestore eventi nella finestra intitolano il numero di volte in cui la finestra è stata ridimensionata.

Questo esempio è valido per una personalizzazione a livello di documento.

Private resizeCount As Integer = 0
Private Sub DocumentWindowSize()
    AddHandler Me.WindowSize, AddressOf ThisDocument_WindowSize
End Sub

Private Sub ThisDocument_WindowSize(ByVal sender As Object, ByVal e As Microsoft.Office.Tools.Word.WindowEventArgs)
    resizeCount += 1
    e.Window.Caption = "Window resized " & resizeCount.ToString() & " times."
End Sub
int resizeCount = 0;
private void DocumentWindowSize()
{
    this.WindowSize +=
        new Microsoft.Office.Tools.Word.WindowEventHandler(
        ThisDocument_WindowSize);
}

void ThisDocument_WindowSize(object sender,
    Microsoft.Office.Tools.Word.WindowEventArgs e)
{
    resizeCount++;
    e.Window.Caption = "Window resized " +
        resizeCount.ToString() + " times.";
}

Vedere anche

Riferimenti

Spazio dei nomi Microsoft.Office.Tools.Word