Hi members
How i can to select the page number to print in print preview dialog box?
when i put the page number and try it not effect the print button
like when i choose to print page 4 and click ok it will print all page
this is my try
Code:Private Sub PDB_Click1(ByVal sender As Object, ByVal e As EventArgs) Handles PDB.Click PrintDialog1.AllowSelection = True PrintDialog1.AllowCurrentPage = True PrintDialog1.AllowSomePages = True PrintDialog1.ShowDialog() End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Timer1.Stop() Dim ppd As New PrintPreviewDialogWithPrinter ppd.Document = PrintDocument1 PrintDocument1.DefaultPageSettings.Landscape = True PrintDialog1.Document = PrintDocument1 CType(ppd.Controls(1), ToolStrip).Items.Add(PDB) ppd.WindowState = FormWindowState.Maximized ppd.ShowDialog() Me.Close() End Sub




Reply With Quote
