I have searched the web about the topic but all I have found is the VB and C# solutions. Does anybody know if there is a way in VFP 9 to print out the content in the RichTextBox?
Asked
Active
Viewed 441 times
1 Answers
0
The following fox pro codes enables a function called selprint which can be used to print the contents of RTB
cdlPDReturnDC=256
cdlPDNoPageNums=8
cdlPDSelection=1
cdlPDAllPages=0
Thisform.CommDlg1.Flags = cdlPDReturnDC + cdlPDNoPageNums
If Thisform.RTF1.SelLength = 0
Thisform.CommDlg1.Flags = Thisform.CommDlg1.Flags ;
+ cdlPDAllPages
Else
Thisform.CommDlg1.Flags = Thisform.CommDlg1.Flags ;
+ cdlPDSelection
EndIf
Thisform.CommDlg1.ShowPrinter
Thisform.RTF1.SelPrint(Thisform.CommDlg1.hDC)

Sudheej
- 1,873
- 6
- 30
- 57