0

I want to use the printPreviewDialog control to view the print preview of a document.
I am using this code

Dim oPD As New PrintDocument
oPD.DocumentName = TextBox1.Text
PrintPreviewDialog1.PrintPreviewControl.Document = oPD
PrintPreviewDialog1.ShowDialog()

TextBox1 contains the file name to be opened with print preview control. Problem is that it only show the empty print preview control . If someone can tell me what's wrong with my code. I am using vb.net.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by FaridMasood
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.