Can I suppress print preview multipage icons?

Visual Basic 2005 Exress Edition:

On the print preview, there are icons for:

1 page

2 pages

3 pages

4 pages

6 pages

But, my application always only prints out one page.

Can I suppress those icons



Answer this question

Can I suppress print preview multipage icons?

  • Kruthi

    A print preview control is the 'innards' of what a print preview dialog looks like. I added the following code to a program I'm working on to test your idea. You would have to add some way to clear the showing of the print preview control, because it has no buttons. Just adding the control seems to launch the print event, and I don't know exactly how to refresh the thing other than 'disposing' of it and rebuilding it each time. (I did not spent a lot a time on trying to get this perfect, only enough time to get you pointed in a possible solution direction.)

    Friend WithEvents PrintPreviewControl1 As System.Windows.Forms.PrintPreviewControl

    Private Sub HelpToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripMenuItem1.Click

    Try

    Me.PrintPreviewControl1.Dispose()

    Catch ex As Exception

    End Try

    Me.PrintPreviewControl1 = New System.Windows.Forms.PrintPreviewControl

    Me.PrintPreviewControl1.Document = Me.PrintDocument1

    Me.PrintPreviewControl1.Enabled = False

    Me.PrintPreviewControl1.Location = New System.Drawing.Point(589, 27)

    Me.PrintPreviewControl1.Name = "PrintPreviewControl1"

    Me.PrintPreviewControl1.Size = New System.Drawing.Size(311, 271)

    Me.PrintPreviewControl1.TabIndex = 5

    Me.Controls.Add(Me.PrintPreviewControl1)

    PrintPreviewControl1.Document = PrintDocument1

    StartPosInRTFBox = 0 ' setup needed in my program

    StopPosInRTFBox = RichTextBox1.TextLength 'setup needed in my program

    PrintPreviewControl1.Show()

    PrintPreviewControl1.BringToFront()

    End Sub



  • Ingo

    Hi.

    Could you please be more clear in your problem definition

    Thank you,
    Bhanu.



  • Can I suppress print preview multipage icons?