<?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%2FPrint_Dialog</id>
		<title>VB.Net Tutorial/GUI/Print 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%2FPrint_Dialog"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/Print_Dialog&amp;action=history"/>
		<updated>2026-04-05T23:50:01Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/Print_Dialog&amp;diff=3818&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/Print_Dialog&amp;diff=3818&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/Print_Dialog&amp;diff=3819&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/Print_Dialog&amp;diff=3819&amp;oldid=prev"/>
				<updated>2010-05-26T12:56:57Z</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;==Display Print dialog and get settings==&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.IO&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class PageSetupDialogSettings&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Dim PrintDB As New PrintDialog()&lt;br /&gt;
        PrintDB.Document = New System.Drawing.Printing.PrintDocument()&lt;br /&gt;
        If (PrintDB.ShowDialog() = DialogResult.OK) Then&lt;br /&gt;
            Console.WriteLine(&amp;quot;Printer: &amp;quot; &amp;amp; PrintDB.PrinterSettings.PrinterName)&lt;br /&gt;
            Console.WriteLine(&amp;quot;From Page: &amp;quot; &amp;amp; PrintDB.PrinterSettings.FromPage)&lt;br /&gt;
            Console.WriteLine(&amp;quot;To Page: &amp;quot; &amp;amp; PrintDB.PrinterSettings.ToPage)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Print Range: &amp;quot; &amp;amp; PrintDB.PrinterSettings.PrintRange)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Copies: &amp;quot; &amp;amp; PrintDB.PrinterSettings.Copies)&lt;br /&gt;
            If (PrintDB.PrinterSettings.LandscapeAngle = 90) Then&lt;br /&gt;
                Console.WriteLine(&amp;quot;Landscape&amp;quot;)&lt;br /&gt;
            Else&lt;br /&gt;
                Console.WriteLine(&amp;quot;Portrait&amp;quot;)&lt;br /&gt;
            End If&lt;br /&gt;
            Console.WriteLine(&amp;quot;Allow Print to File: &amp;quot; &amp;amp; PrintDB.AllowPrintToFile)&lt;br /&gt;
            Console.WriteLine(&amp;quot;AllowSelection: &amp;quot; &amp;amp; PrintDB.AllowSelection)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Allow Some Pages: &amp;quot; &amp;amp; PrintDB.AllowSomePages)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Print to File: &amp;quot; &amp;amp; PrintDB.PrintToFile)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Show Network: &amp;quot; &amp;amp; PrintDB.ShowNetwork)&lt;br /&gt;
        End If&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Has more pages==&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;
public class PrintDialogHasMorePage&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;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click&lt;br /&gt;
        If pdlgRectangle.ShowDialog() = Windows.Forms.DialogResult.OK Then&lt;br /&gt;
            pdocRectangle.Print()&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pdocRectangle.PrintPage&lt;br /&gt;
        e.Graphics.DrawRectangle(Pens.Black, 100, 100, 600, 300)&lt;br /&gt;
        e.HasMorePages = False&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.pdlgRectangle = New System.Windows.Forms.PrintDialog&lt;br /&gt;
        Me.pdocRectangle = New System.Drawing.Printing.PrintDocument&lt;br /&gt;
        Me.btnPrint = New System.Windows.Forms.Button&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;pdlgRectangle&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.pdlgRectangle.AllowSomePages = True&lt;br /&gt;
        Me.pdlgRectangle.Document = Me.pdocRectangle&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnPrint&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnPrint.Location = New System.Drawing.Point(112, 40)&lt;br /&gt;
        Me.btnPrint.Name = &amp;quot;btnPrint&amp;quot;&lt;br /&gt;
        Me.btnPrint.Size = New System.Drawing.Size(64, 24)&lt;br /&gt;
        Me.btnPrint.TabIndex = 1&lt;br /&gt;
        Me.btnPrint.Text = &amp;quot;Print&amp;quot;&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, 134)&lt;br /&gt;
        Me.Controls.Add(Me.btnPrint)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;UsePringDialog&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents pdlgRectangle As System.Windows.Forms.PrintDialog&lt;br /&gt;
    Friend WithEvents pdocRectangle As System.Drawing.Printing.PrintDocument&lt;br /&gt;
    Friend WithEvents btnPrint As System.Windows.Forms.Button&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PrintSettings for a 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.Windows.Forms&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
public class PrintDialogPrinterSetting&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 Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
        Dim PrintDialog1 As New PrintDialog()&lt;br /&gt;
        Dim PrintDocument1 As System.Drawing.Printing.PrintDocument&lt;br /&gt;
        PrintDialog1.Document = PrintDocument1&lt;br /&gt;
        PrintDialog1.PrinterSettings.Copies = 5&lt;br /&gt;
        PrintDialog1.PrinterSettings.FromPage = 1&lt;br /&gt;
        PrintDialog1.PrinterSettings.ToPage = 5&lt;br /&gt;
        If PrintDialog1.ShowDialog = DialogResult.OK Then&lt;br /&gt;
            PrintDocument1.Print()&lt;br /&gt;
        End If&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 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 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.PrintDialog1 = New System.Windows.Forms.PrintDialog&lt;br /&gt;
        Me.Button1 = New System.Windows.Forms.Button&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;PrintDialog1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.PrintDialog1.UseEXDialog = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Button1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Button1.Location = New System.Drawing.Point(136, 145)&lt;br /&gt;
        Me.Button1.Name = &amp;quot;Button1&amp;quot;&lt;br /&gt;
        Me.Button1.Size = New System.Drawing.Size(75, 23)&lt;br /&gt;
        Me.Button1.TabIndex = 0&lt;br /&gt;
        Me.Button1.Text = &amp;quot;Button1&amp;quot;&lt;br /&gt;
        Me.Button1.UseVisualStyleBackColor = True&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!, 12.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(364, 200)&lt;br /&gt;
        Me.Controls.Add(Me.Button1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents PrintDialog1 As System.Windows.Forms.PrintDialog&lt;br /&gt;
    Friend WithEvents Button1 As System.Windows.Forms.Button&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Print three pages out==&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.Printing&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
&lt;br /&gt;
public class PrintPagesOut&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 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.pdocShapes = New System.Drawing.Printing.PrintDocument&lt;br /&gt;
        Me.ppvShapes = New System.Windows.Forms.PrintPreviewControl&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ppvShapes&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ppvShapes.AutoZoom = False&lt;br /&gt;
        Me.ppvShapes.Columns = 3&lt;br /&gt;
        Me.ppvShapes.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.ppvShapes.Document = Me.pdocShapes&lt;br /&gt;
        Me.ppvShapes.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.ppvShapes.Name = &amp;quot;ppvShapes&amp;quot;&lt;br /&gt;
        Me.ppvShapes.Size = New System.Drawing.Size(544, 228)&lt;br /&gt;
        Me.ppvShapes.TabIndex = 1&lt;br /&gt;
        Me.ppvShapes.Zoom = 0.18509803921568627&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(544, 228)&lt;br /&gt;
        Me.Controls.Add(Me.ppvShapes)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;UsePrintPreviewControl&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents pdocShapes As System.Drawing.Printing.PrintDocument&lt;br /&gt;
    Friend WithEvents ppvShapes As System.Windows.Forms.PrintPreviewControl&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>