Bonsoir,
J'ai un soucis avec un PrintSetupDialog
Tout fonctionne presque bien, je choisis mon imprimante, puis la fenêtre des paramètres s'ouvre, et si je modifie les marges ça ne les prends pas en compte, ça imprime toujours dans le coin supérieur gauche de la feuille.
Par contre l'orientation de la feuille fonctionne bien.
Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 PrintDialog1.Document = PrintDocument1 If PrintDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then Dim MaConfig As New PageSettings PageSetupDialog1.Document = PrintDocument1 If PageSetupDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then PageSetupDialog1.PageSettings = MaConfig PrintDocument1.DefaultPageSettings = MaConfig End If PrintDocument1.Print() End IfMerci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage e.Graphics.DrawImage(PictureBoxLune.Image, 0, 0, 62, 61) End Sub
Partager