<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FGUI%2FPrintPreview_Dialog</id>
		<title>VB.Net Tutorial/GUI/PrintPreview Dialog - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FGUI%2FPrintPreview_Dialog"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/PrintPreview_Dialog&amp;action=history"/>
		<updated>2026-04-05T23:48:26Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/PrintPreview_Dialog&amp;diff=3924&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/PrintPreview_Dialog&amp;diff=3924&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/PrintPreview_Dialog&amp;diff=3925&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/PrintPreview_Dialog&amp;diff=3925&amp;oldid=prev"/>
				<updated>2010-05-26T12:57:30Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==PrintPreview page count==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Printing&lt;br /&gt;
public class PrintPreviewPagesOut&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private currentPageNumber As Integer = 1&lt;br /&gt;
    Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click&lt;br /&gt;
        If ppvdlgShapes.ShowDialog() = Windows.Forms.DialogResult.OK Then&lt;br /&gt;
            ppvdlgShapes.Document.Print()&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pdocShapes_PrintPage(ByVal sender As System.Object, _&lt;br /&gt;
     ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pdocShapes.PrintPage&lt;br /&gt;
        Select Case currentPageNumber&lt;br /&gt;
            Case 1&lt;br /&gt;
                e.Graphics.DrawRectangle(Pens.Green, e.MarginBounds())&lt;br /&gt;
                e.HasMorePages = True&lt;br /&gt;
                currentPageNumber += 1&lt;br /&gt;
            Case 2&lt;br /&gt;
                e.Graphics.DrawRectangle(Pens.Green, e.MarginBounds())&lt;br /&gt;
                e.HasMorePages = True&lt;br /&gt;
                currentPageNumber += 1&lt;br /&gt;
            Case 3&lt;br /&gt;
                e.Graphics.DrawEllipse(Pens.Blue, e.MarginBounds())&lt;br /&gt;
                e.HasMorePages = False&lt;br /&gt;
                currentPageNumber = 1&lt;br /&gt;
        End Select&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.btnPreview = New System.Windows.Forms.Button&lt;br /&gt;
        Me.pdocShapes = New System.Drawing.Printing.PrintDocument&lt;br /&gt;
        Me.ppvdlgShapes = New System.Windows.Forms.PrintPreviewDialog&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnPreview&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnPreview.Location = New System.Drawing.Point(112, 48)&lt;br /&gt;
        Me.btnPreview.Name = &amp;quot;btnPreview&amp;quot;&lt;br /&gt;
        Me.btnPreview.Size = New System.Drawing.Size(64, 24)&lt;br /&gt;
        Me.btnPreview.TabIndex = 1&lt;br /&gt;
        Me.btnPreview.Text = &amp;quot;Preview&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ppvdlgShapes&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ppvdlgShapes.AutoScrollMargin = New System.Drawing.Size(0, 0)&lt;br /&gt;
        Me.ppvdlgShapes.AutoScrollMinSize = New System.Drawing.Size(0, 0)&lt;br /&gt;
        Me.ppvdlgShapes.ClientSize = New System.Drawing.Size(400, 300)&lt;br /&gt;
        Me.ppvdlgShapes.Document = Me.pdocShapes&lt;br /&gt;
        Me.ppvdlgShapes.Enabled = True&lt;br /&gt;
        Me.ppvdlgShapes.Name = &amp;quot;ppvdlgShapes&amp;quot;&lt;br /&gt;
        Me.ppvdlgShapes.Visible = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 142)&lt;br /&gt;
        Me.Controls.Add(Me.btnPreview)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;UsePrintPreviewDialog&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents btnPreview As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents pdocShapes As System.Drawing.Printing.PrintDocument&lt;br /&gt;
    Friend WithEvents ppvdlgShapes As System.Windows.Forms.PrintPreviewDialog&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Print, PrintPreview Dialog and Print Dialog==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing.Printing&lt;br /&gt;
public class PrintPreviewDemo&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New MainForm)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
&lt;br /&gt;
Public Class MainForm&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents printButton As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents previewButton As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents previewControlButton As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents pageSetupButton As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents pageSetupDialog1 As System.Windows.Forms.PageSetupDialog&lt;br /&gt;
    Friend WithEvents printDialog1 As System.Windows.Forms.PrintDialog&lt;br /&gt;
    Friend WithEvents printDocument1 As System.Drawing.Printing.PrintDocument&lt;br /&gt;
    Friend WithEvents printPreviewDialog1 As System.Windows.Forms.PrintPreviewDialog&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.printButton = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.previewButton = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.previewControlButton = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.pageSetupButton = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.pageSetupDialog1 = New System.Windows.Forms.PageSetupDialog()&lt;br /&gt;
        Me.printDialog1 = New System.Windows.Forms.PrintDialog()&lt;br /&gt;
        Me.printDocument1 = New System.Drawing.Printing.PrintDocument()&lt;br /&gt;
        Me.printPreviewDialog1 = New System.Windows.Forms.PrintPreviewDialog()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;printButton&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.printButton.Location = New System.Drawing.Point(24, 16)&lt;br /&gt;
        Me.printButton.Name = &amp;quot;printButton&amp;quot;&lt;br /&gt;
        Me.printButton.Size = New System.Drawing.Size(112, 23)&lt;br /&gt;
        Me.printButton.TabIndex = 3&lt;br /&gt;
        Me.printButton.Text = &amp;quot;Print&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;previewButton&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.previewButton.Location = New System.Drawing.Point(24, 80)&lt;br /&gt;
        Me.previewButton.Name = &amp;quot;previewButton&amp;quot;&lt;br /&gt;
        Me.previewButton.Size = New System.Drawing.Size(112, 23)&lt;br /&gt;
        Me.previewButton.TabIndex = 6&lt;br /&gt;
        Me.previewButton.Text = &amp;quot;Preview Dialog&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;previewControlButton&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.previewControlButton.Location = New System.Drawing.Point(24, 48)&lt;br /&gt;
        Me.previewControlButton.Name = &amp;quot;previewControlButton&amp;quot;&lt;br /&gt;
        Me.previewControlButton.Size = New System.Drawing.Size(112, 23)&lt;br /&gt;
        Me.previewControlButton.TabIndex = 4&lt;br /&gt;
        Me.previewControlButton.Text = &amp;quot;Preview Control&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;pageSetupButton&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.pageSetupButton.Location = New System.Drawing.Point(24, 112)&lt;br /&gt;
        Me.pageSetupButton.Name = &amp;quot;pageSetupButton&amp;quot;&lt;br /&gt;
        Me.pageSetupButton.Size = New System.Drawing.Size(112, 23)&lt;br /&gt;
        Me.pageSetupButton.TabIndex = 5&lt;br /&gt;
        Me.pageSetupButton.Text = &amp;quot;Page Setup&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;pageSetupDialog1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.pageSetupDialog1.MinMargins = New System.Drawing.Printing.Margins(50, 50, 50, 50)&lt;br /&gt;
        Me.pageSetupDialog1.ShowHelp = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;printDialog1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.printDialog1.Document = Me.printDocument1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;printDocument1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;printPreviewDialog1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.printPreviewDialog1.AutoScrollMargin = New System.Drawing.Size(0, 0)&lt;br /&gt;
        Me.printPreviewDialog1.AutoScrollMinSize = New System.Drawing.Size(0, 0)&lt;br /&gt;
        Me.printPreviewDialog1.ClientSize = New System.Drawing.Size(400, 300)&lt;br /&gt;
        Me.printPreviewDialog1.Enabled = True&lt;br /&gt;
        Me.printPreviewDialog1.Location = New System.Drawing.Point(44, 58)&lt;br /&gt;
        Me.printPreviewDialog1.MaximumSize = New System.Drawing.Size(0, 0)&lt;br /&gt;
        Me.printPreviewDialog1.Name = &amp;quot;printPreviewDialog1&amp;quot;&lt;br /&gt;
        Me.printPreviewDialog1.Opacity = 1&lt;br /&gt;
        Me.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty&lt;br /&gt;
        Me.printPreviewDialog1.Visible = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MainForm&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(160, 150)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.printButton, Me.previewButton, Me.previewControlButton, Me.pageSetupButton})&lt;br /&gt;
        Me.Name = &amp;quot;MainForm&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;MainForm&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Dim totalPages As Integer = 13&lt;br /&gt;
    Dim page As Integer&lt;br /&gt;
    Dim maxPage As Integer&lt;br /&gt;
    Dim myFont As Font = Nothing&lt;br /&gt;
    Private Sub printButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printButton.Click&lt;br /&gt;
        printDocument1.DocumentName = &amp;quot;myFile.txt&amp;quot;&lt;br /&gt;
        printDocument1.PrinterSettings.FromPage = 1&lt;br /&gt;
        printDocument1.PrinterSettings.ToPage = totalPages&lt;br /&gt;
        printDocument1.PrinterSettings.MinimumPage = 1&lt;br /&gt;
        printDocument1.PrinterSettings.MaximumPage = totalPages&lt;br /&gt;
        printDialog1.AllowSomePages = True&lt;br /&gt;
        If printDialog1.ShowDialog() = DialogResult.OK Then&lt;br /&gt;
            If printDialog1.PrinterSettings.PrintRange = Drawing.Printing.PrintRange.SomePages Then&lt;br /&gt;
                page = printDocument1.PrinterSettings.FromPage&lt;br /&gt;
                maxPage = printDocument1.PrinterSettings.ToPage&lt;br /&gt;
            Else&lt;br /&gt;
                page = 1&lt;br /&gt;
                maxPage = totalPages&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        printDocument1.Print()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Sub printDocument1_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs) Handles printDocument1.PrintPage&lt;br /&gt;
        Dim g As Graphics = e.Graphics&lt;br /&gt;
        g.DrawString(&amp;quot;Hello, &amp;quot; &amp;amp; vbCrLf &amp;amp; &amp;quot;Printer&amp;quot; &amp;amp; vbCrLf &amp;amp; &amp;quot;Page: &amp;quot; &amp;amp; page, myFont, Brushes.Black, RectangleF.op_Implicit(e.MarginBounds))&lt;br /&gt;
        page = page + 1&lt;br /&gt;
        e.HasMorePages = (page &amp;lt;= maxPage)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub previewControlButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles previewControlButton.Click&lt;br /&gt;
        page = 1&lt;br /&gt;
        maxPage = totalPages&lt;br /&gt;
        printPreviewDialog1.Document = printDocument1&lt;br /&gt;
        printPreviewDialog1.ShowDialog()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub previewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles previewButton.Click&lt;br /&gt;
        page = 1&lt;br /&gt;
        maxPage = totalPages&lt;br /&gt;
        Dim dlg As CustomPrintPreviewDialog = New CustomPrintPreviewDialog()&lt;br /&gt;
        dlg.Document = printDocument1&lt;br /&gt;
        dlg.ShowDialog()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pageSetupButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pageSetupButton.Click&lt;br /&gt;
        pageSetupDialog1.Document = printDocument1&lt;br /&gt;
        pageSetupDialog1.ShowDialog()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub printDocument1_BeginPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles printDocument1.BeginPrint&lt;br /&gt;
        myFont = New Font(&amp;quot;Lucide Console&amp;quot;, 72)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub printDocument1_EndPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles printDocument1.EndPrint&lt;br /&gt;
        myFont.Dispose()&lt;br /&gt;
        myFont = Nothing&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Public Class CustomPrintPreviewDialog&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents printPreviewControl1 As System.Windows.Forms.PrintPreviewControl&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.printPreviewControl1 = New System.Windows.Forms.PrintPreviewControl()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;printPreviewControl1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.printPreviewControl1.AutoZoom = False&lt;br /&gt;
        Me.printPreviewControl1.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.printPreviewControl1.Name = &amp;quot;printPreviewControl1&amp;quot;&lt;br /&gt;
        Me.printPreviewControl1.Size = New System.Drawing.Size(376, 398)&lt;br /&gt;
        Me.printPreviewControl1.TabIndex = 1&lt;br /&gt;
        Me.printPreviewControl1.UseAntiAlias = True&lt;br /&gt;
        Me.printPreviewControl1.Zoom = 0.30000001192092896&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;CustomPrintPreviewDialog&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(376, 398)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.printPreviewControl1})&lt;br /&gt;
        Me.Name = &amp;quot;CustomPrintPreviewDialog&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;CustomPrintPreviewDialog&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub printPreviewControl1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles printPreviewControl1.Click&lt;br /&gt;
        If (Control.ModifierKeys And Keys.Shift) = 0 Then&lt;br /&gt;
            printPreviewControl1.Zoom = printPreviewControl1.Zoom * 2.0&lt;br /&gt;
        Else&lt;br /&gt;
            printPreviewControl1.Zoom = printPreviewControl1.Zoom / 2.0&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Property Document() As PrintDocument&lt;br /&gt;
        Get&lt;br /&gt;
            Return printPreviewControl1.Document&lt;br /&gt;
        End Get&lt;br /&gt;
        Set(ByVal Value As PrintDocument)&lt;br /&gt;
            printPreviewControl1.Document = Value&lt;br /&gt;
        End Set&lt;br /&gt;
    End Property&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>