Information générale
Catégorie:
Contrôles ActiveX en VFP
I find a solution myself!
We need a Common Dialog control in the form.
* Use SelPrint of RichTextbox control
* CommonDialog Control's flags
* Define constant
cdlPDReturnDC = 256
cdlPDNoPageNums = 8
cdlPDAllPages = 0
cdlPDSelection = 1
with this.parent.CommonDialog1
* Set CommonDialog Flag
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If this.parent.oleRtf.SelLength = 0
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
EndIf
* Show printer prompt
.ShowPrinter
endwith
this.parent.oleRtf.SelPrint( this.parent.CommonDialog1.hDC )
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement