WorkbookBase.WindowResize Event
Occurs when any workbook window is resized.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
'Declaration
Public Event WindowResize As WorkbookEvents_WindowResizeEventHandler
public event WorkbookEvents_WindowResizeEventHandler WindowResize
Examples
The following code example demonstrates a handler for the WindowResize event. The event handler displays the name that appears in the title bar of the workbook window that was resized.
This example is for a document-level customization.
Private Sub ThisWorkbook_WindowResize(ByVal Wn As Excel.Window) _
Handles Me.WindowResize
MsgBox(Wn.Caption & " resized.")
End Sub
private void WorkbookWindowResize()
{
this.WindowResize +=
new Excel.WorkbookEvents_WindowResizeEventHandler(
ThisWorkbook_WindowResize);
}
private void ThisWorkbook_WindowResize(Excel.Window Wn)
{
MessageBox.Show(Wn.Caption + " resized.");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.