Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing from the Rich Text Control
Message
De
08/10/2001 15:04:52
 
 
À
08/10/2001 11:41:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00565529
Message ID:
00565624
Vues:
21
>I am trying to print from the MS rich text control. They give an example of how to print from the control in the help file...but the example is VB based and does not seem to work.
>
>ThisForm.oleCommonDialog.ShowPrinter && Displays dialog just fine...
>
>* there is a command here that I do not know how to replicate in VFP
>* Printer.Print ""
>* but I'm guessing is my missing link...Then,
>
>ThisForm.oleRTC.SelPrint(ThisForm.oleCommonDialog.hDC)
>
>I get an error on the above line that I have an invalid HDC...
>
>Any ideas how to correct this?
>
>Thanks in advance.

Bob,

Download vbPrinter.ocx, and drop it on your form:

http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,54,Forum=5,28,1103

Assuming that you name the vbPrinter control 'oPrinter', and your richtext control is oRtf, you can print the selection with:
thisForm.ortf.selPrint(thisForm.oprinter.hdc)
I can't tell you how to change printers or any other details of the VBPrinter.ocx, but I am able to print from richTextControl using this class.

HTH,
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform