Spread Windows Forms 6.0 Product Documentation
PrintBackgroundEventHandler Delegate
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : PrintBackgroundEventHandler Delegate


sender
Source of the event
e
Event data

Glossary Item Box

Represents a defined method that handles the PrintBackground event for the Spread component.

Syntax

Visual Basic (Declaration) 
Public Delegate Sub PrintBackgroundEventHandler( _
   ByVal sender As Object, _
   ByVal e As PrintBackgroundEventArgs _
) 
Visual Basic (Usage)Copy Code
Dim instance As New PrintBackgroundEventHandler(AddressOf HandlerMethod)
C# 
public delegate void PrintBackgroundEventHandler( 
   object sender,
   PrintBackgroundEventArgs e
)

Parameters

sender
Source of the event
e
Event data

Remarks

For information on the event, refer to the FpSpread PrintBackground event.

Example

This example creates the PrintBackground event.
C#Copy Code
fpSpread1.PrintBackground += new FarPoint.Win.Spread.PrintBackgroundEventHandler(fpSpread1_PrintBackground);
private void fpSpread1_PrintBackground(object sender, FarPoint.Win.Spread.PrintBackgroundEventArgs e)
{
      FarPoint.Win.Picture pic = new FarPoint.Win.Picture(Image.FromFile("C:\\Windows\\zapotec.bmp"), FarPoint.Win.RenderStyle.Normal);
      pic.AlignHorz = FarPoint.Win.HorizontalAlignment.Center;
      pic.AlignVert = FarPoint.Win.VerticalAlignment.Center;
      pic.Paint(e.Graphics, e.SheetRect);
}
Visual BasicCopy Code
Dim eh As FarPoint.Win.Spread.PrintBackgroundEventHandler = AddressOf FpSpread1_PrintBackground
AddHandler FpSpread1.PrintBackground, eh
Private Sub FpSpread1_PrintBackground(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.PrintBackgroundEventArgs) Handles
FpSpread1.PrintBackground
      Dim pic As New FarPoint.Win.Picture(Image.FromFile("C:/Windows/zapotec.bmp"), FarPoint.Win.RenderStyle.Normal)
      pic.AlignHorz = FarPoint.Win.HorizontalAlignment.Center
      pic.AlignVert = FarPoint.Win.VerticalAlignment.Center
      pic.Paint(e.Graphics, e.SheetRect)
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.