Torna al Thread

Public Class Form1 Private WithEvents PD As New Printing.PrintDocument Private Sub Anteprima_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Anteprima.Click Try Dim F1 As New PageSetupDialog F1.Document = PD If F1.ShowDialog() <> Windows.Forms.DialogResult.OK Then Exit Sub Dim F2 As New PrintPreviewDialog F2.ShowIcon = False F2.Document = PD F2.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Sub PD_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PD.PrintPage Try e.Graphics.DrawString("Questo Forum è un' ottomo Forum.", New Font("Arial", 30, FontStyle.Bold), Brushes.Black, 10, 10) Catch ex As Exception MsgBox(ex.Message) End Try End Sub End Class
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5