Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rich Text Box not printing top 2 lines of 2nd page

Status
Not open for further replies.
Aug 13, 2002
14
US
I am using the below code to print a rich text box named
txtTestFile. The problem is the top 2 lines of the 2nd page are not printing...any ideas? Someone told me that a certain flag has to be set... I have no idea how to do that if that would help. Could you add the code to the below if it may solve the problem? Also, what code has to be added to this so if the user clicks the cancel on the CommonDialog1 control, it will cancel the printing and not quit as it currently does.
Thank you so much
Glenn
=========================================================

CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
If txtTestFile.SelLength = 0 Then
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDAllPages
Else
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDSelection
End If
CommonDialog1.ShowPrinter
Printer.Print ""
txtTestFile.SelPrint CommonDialog1.hDC
==========================================================
 

A couple of things you might want to look at. The height and width properties of the printer object and the same for the printer driver. Also if the driver is set to legal and you have A4 (or is it the other way around?)...

Just some thoughts

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top