This topic has not yet been rated - Rate this topic

WindowEventArgs Interface

Provides information for the ActivateEvent, Deactivate, and WindowSize events.

Namespace:  Microsoft.Office.Tools.Word
Assemblies:   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)
[GuidAttribute("767d9ec0-c72c-4f66-892b-be4a4b20eba3")]
public interface WindowEventArgs

The WindowEventArgs type exposes the following members.

  NameDescription
Public propertyWindowGets the window being acted upon by the ActivateEvent, Deactivate, and WindowSize methods.
Top

The following code example creates an event handler for the WindowSize event. The event handler displays in the window caption the number of times that the window has been resized.

This example is for a document-level customization.

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.";
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.