Web Analytics Made Easy -
StatCounter Visual Basic Print preview and Print problem. - CodingForum

Announcement

Collapse
No announcement yet.

Visual Basic Print preview and Print problem.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Visual Basic Print preview and Print problem.

    Here is my code, for the print preview I only get a blank page not the page I want to print. What do I have wrong? Thanks.

    Code:
    Private Sub mnuFile01Print_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFile01Print.Click
            If PdPrint1.ShowDialog = DialogResult.OK Then
                'showDialog method makes the dialog box visible at run time
                PrintDocument1.Print()
            End If
        End Sub
    
        Private Sub mnuFilePrintPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFilePrintPreview.Click
            Try
                PrintPreview.ShowDialog()
            Catch es As Exception
                MessageBox.Show(es.Message)
            End Try
        End Sub
    Can someone please help?Thanks.
    Last edited by gabald_28; Apr 17, 2009, 02:49 PM.
Working...
X