Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing from the Rich Text Control
Message
From
08/10/2001 15:04:52
 
 
To
08/10/2001 11:41:08
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00565529
Message ID:
00565624
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform