Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Rich TextBox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00313948
Message ID:
00316136
Vues:
47
Hi Stephane...

To avoid the error error, you need to employ an error trapping mechanism. The fact that the error, or more accurately the exception occurs is importance since it is the only way you know if the user pressed the Error Button. I wrote a fairly extensive article on this in FoxTalk about 2 years ago.

I sent you my RTF stuff, which should help you with respect to the error handling strategy.

With respect to not showing the ShowPrinter Dialog, Christof Lange had some API code. I however, never got it to work reliably. The only consistient behavior I achieved was with the common dialog control. If we could reliably create a printer device context in VFP without the Common Dialog Control, well, that would be nice!!

Good Luck..


>I am trying to print the content of the rich text box, here is how i do it:
>
>
>oCommonDialog.Flags = 0x100
>oCommonDialog.ShowPrinter
>oRichTextBox.SelPrint(oCommonDialog.hdc)
>
>
>It Works fine but if the users press cancel on showPrinter(), i get an invalid hdc error message. I have 2 questions:
>
>1. How could i avoid the error message ?
>2. How could i print without showing the ShowPrinter() Dialog ?
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform