CrystalReportViewer.ViewZoom Event
Event fires when zoom level of the CrystalReportViewer control changes.
Namespace CrystalDecisions.Windows.Forms Assembly CrystalDecisions.Windows.Forms (CrystalDecisions.Windows.Forms.dll)
Syntax
'Declaration
Public Event ViewZoom As CrystalDecisions.Windows.Forms.ZoomEventHandler
public event CrystalDecisions.Windows.Forms.ZoomEventHandler ViewZoom
Event Data
The event handler receives an argument of type ZoomEventArgs containing data related to this event. The following ZoomEventArgs properties provide information specific to this event.
Property | Description |
---|---|
CurrentZoomFactor | Gets current the magnification factor of the CrystalReportViewer control. |
Handled | Gets or sets whether the event was handled. Set to true if you do not want the default action to occur. |
NewZoomFactor | Gets the new magnification factor of the CrystalReportViewer control. |
Remarks
This event will be raised when the zoom level in the CrystalReportViewer control is changed.
Example
This example demonstrates how to set the text of a label to the new zoom level.
'Declaration
Private Sub CrystalReportViewer1_ViewZoom _
(ByVal source As Object, _
ByVal e As CrystalDecisions.Windows.Forms.ZoomEventArgs) Handles _
CrystalReportViewer1.ViewZoom
Label1.Text = e.NewZoomFactor.ToString()
End Sub
void crystalReportViewer1_ViewZoom (Object* sender, CrystalDecisions::Windows::Forms::ZoomEventArgs * e)
{
Label1->Text = e->NewZoomFactor->ToString();
};
private void crystalReportViewer1_ ViewZoom (object source, CrystalDecisions.Windows.Forms.ZoomEventArgs e)
{
Label1.Text = e.NewZoomFactor.ToString();
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Windows.Forms Namespace