Can i set margins if so then please tell me how?
I am using this code but pagesetup dilog does not effect the print.

With PageSetupDialog1
            .PageSettings = PrintDocument1.DefaultPageSettings
        End With
        If PageSetupDialog1.ShowDialog = DialogResult.OK Then
            PrintDocument1.DefaultPageSettings = PageSetupDialog1.PageSettings
            PrintForm1.Print()

Replace your codesnippet with this:

PageSetupDialog1.Document = PrintDocument1
If PageSetupDialog1.ShowDialog = DialogResult.OK Then
   PrintForm1.PrinterSettings.DefaultPageSettings.Margins = PageSetupDialog1.PageSettings.Margins
   PrintForm1.Print()
End If

Still it did not have any effect it does not take any settings which i made

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.