Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
'Me.PrintPreviewDialog1.ShowDialog()
PrintDialog1.Document = PrintDocument1
fspList.PrintType = FPUSpreadADO.PrintTypeConstants.PrintTypeAll
If PrintDialog1.ShowDialog() = DialogResult.OK Then
If PrintDocument1.DefaultPageSettings.Landscape Then
fspList.PrintOrientation = FPUSpreadADO.PrintOrientationConstants.PrintOrientationLandscape
fspList.PrintSheet()
Else
fspList.PrintOrientation = FPUSpreadADO.PrintOrientationConstants.PrintOrientationPortrait
fspList.PrintSheet()
End If
End If
End Sub