Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rich text control
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Rich text control
Miscellaneous
Thread ID:
00334650
Message ID:
00334650
Views:
86
I've found some info about RTF but I have questions about it and am hoping someone can help me. I've listed the code I found below. When I put the code in the init of the CommonDialog control, I get an error message about the property flags not being found. Where does flags get initialized? Can someone please help. I'm trying to print a RTF in a report with a text variable.

TIA



From
John Petersen
IDT Marketing Systems and
Services, Inc.
10/13/1998 10:43:37

Hi,

The RTF Control supports a SelPrint() method. To use it, you need to send an hDC
parameter. The hDC is a handle to a printer device context. Visual Basic handles this
automatically. We can do this same thing in VFP, but we need to use the services of the
Common Dialog Control. Ted Roche, Christof Lange, and I collaborated on a programmatic
way to do this without the Common Dialog - but it never has worked as cleanly as the
Common Dialog Solution.

To illustrate how to do the following:

1. Add an RTF Control to the form - name it RTF
2. Add a Common Dialog Control to the form - name it CommonDialog
3. Add a VFP CommandButton to the Form.

In the Init() of the CommonDialog, add this code:

This.Flags = 0x100

In the Click() of the CommandButton, add this code:

This.Parent.CommonDialog.ShowPrinter
This.Parent.rtf.SelPrint(This.Parent.CommonDialog.hdc)


Type some text into the RTF control and click the button
Next
Reply
Map
View

Click here to load this message in the networking platform