Question

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?

Was it helpful?

Solution

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)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top