General information
Category:
Reports & Report designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only