bonjour
voila j'ai une richtextbox et je voudrai imprimer son contenu
j'ai programmer ce code et cela fonctionne
With dlgCommonDialog
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
.Flags = .Flags + cdlPDAllPages
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
Printer.Print ""
frmMain.RichTextBox1.SelStart = 0
frmMain.RichTextBox1.SelLength = Len(frmMain.RichTextBox1.Text)
frmMain.RichTextBox1.SelPrint (dlgCommonDialog.hDC)
End If
End With
le probleme c'est que mon imprimante est defini par defaut en paysage et je voudrai imprimer en portrait
j'ai tenter
de changer la propriété Printer.Orientation=1 ou =2
mais cela ne marche pas vb me dit la propriété orientation ne peut pas etre changer dans une page
que faire????