Sub ImpReady(dX As Integer, dY As Integer) ' dX: taille de l'objet à imprimer selon X ' dY: taille de l'objet à imprimer selon Y ' Orientation du papierIf Option3.Value True Then Printer.Orientation 1If Option8.Value True Then Printer.Orientation 2 ' Qualité d'impressionIf Option9.Value True Then Printer.PrintQuality -1If Option10.Value True Then Printert.PrintQuality -3If Option11.Value True Then Printert.PrintQuality -4 ' Impression en niveau de gris If Check1.Value = 1 Then Printer.ColorMode = 1 Else Printer.ColorMode = 2 End If ' Impression recto verso (avec orientation en cours)If Check2.Value 1 Then Printer.Duplex 1 ' Taille de la feuille ' A4 par défaut, combobox non codé Printer.PaperSize = 9 ' Placement sur la feuille Printer.ScaleMode = 7 'en centimètres ' **** DroiteIf Option1.Value True And Check3.Value 0 Then Printer.CurrentX = 1 '1cm End If ' **** GaucheIf Option2.Value True And Check3.Value 0 Then Select Case Option3.Value Case True ' si portrait Printer.CurrentX = 20 - dX Case False ' si paysage Printer.CurrentX = 28.7 - dX End Select End If ' **** CentreIf Option4.Value True And Check3.Value 0 Then Select Case Option3.Value Case True ' si portrait Printer.CurrentX = (20 - dX) / 2 Case False ' si paysage Printer.CurrentX = (28.7 - dX) / 2 End Select End If ' **** HautIf Option5.Value True And Check3.Value 0 Then Printer.CurrentY = 1 '1cm End If ' **** BasIf Option6.Value True And Check3.Value 0 Then Select Case Option3.Value Case True ' si portrait Printer.CurrentX = 28.7 - dY Case False ' si paysage Printer.CurrentX = 20 - dY End Select End If ' **** MilieuIf Option7.Value True And Check3.Value 0 Then Select Case Option3.Value Case True ' si portrait Printer.CurrentX = (28.7 - dY) / 2 Case False ' si paysage Printer.CurrentX = (20 - dY) / 2 End Select End If ' **** Imprimer aux coordonnées If Check3.Value = 1 Then Printer.CurrentX = CInt(Text2.Text) Printer.CurrentY = CInt(Text3.Text) End If ' Nombre de copies Dim strtext As String strtext = Text1.Text Dim inttext As Integer inttext = CInt(strtext) Printer.Copies = inttext End Sub