isnoend2001
asked on
fix print preview for rtf
Hi experts
I have downloaded and hooked into my project a print preview from planet here;
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2355&lngWId=1
Upon final testing of my project i have discovered a couple bugs in this program and need help fixing them\
bug 1: In the print preview it shows 2 pages. When i print it prints all on 1 page(as it should)
Bug2; Print margins below 1 inch are incremented downwords every .05 none seem to matter until it gets to 0.50 and that prints right on the edge.
Can anyone fix these bugs?
I have downloaded and hooked into my project a print preview from planet here;
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2355&lngWId=1
Upon final testing of my project i have discovered a couple bugs in this program and need help fixing them\
bug 1: In the print preview it shows 2 pages. When i print it prints all on 1 page(as it should)
Bug2; Print margins below 1 inch are incremented downwords every .05 none seem to matter until it gets to 0.50 and that prints right on the edge.
Can anyone fix these bugs?
ASKER
Thanks for your reply BlueDevilFan
Bug 1. Reports 2 pages and you are right there is data on page 2. The problem is it
reports 2 pages but prints both pages on 1 page. So the bug is reporting 2 pages when the
data will fit on 1 page.
Bug 2. I have printed with all the different increments and from 1" down to .5 and the printout does not change until .5 and then this prints with no margins.
The printout for 1" margins when printed is 1-1/4" margins
Bug 1. Reports 2 pages and you are right there is data on page 2. The problem is it
reports 2 pages but prints both pages on 1 page. So the bug is reporting 2 pages when the
data will fit on 1 page.
Bug 2. I have printed with all the different increments and from 1" down to .5 and the printout does not change until .5 and then this prints with no margins.
The printout for 1" margins when printed is 1-1/4" margins
Bug 1. I believe it's because there's a page break in the document. I'll see if I can figure something out.
Bug 2. You need to change the margin increment values in the Form_Load event in frmPageSetup to match the increment you switched to. That means changing the value at the end of each of the four lines begining with frmPageSetup. Change the value of m to the minimum margin width. Sorry, I overlooked that earlier.
Bug 2. You need to change the margin increment values in the Form_Load event in frmPageSetup to match the increment you switched to. That means changing the value at the end of each of the four lines begining with frmPageSetup. Change the value of m to the minimum margin width. Sorry, I overlooked that earlier.
ASKER
I think i found the problem with the margins. The gmargin values were declared as integer.
I changed them to this
Public gLeftMargin As Currency
Public gRightMargin As Currency
Public gTopMargin As Currency
Public gBottomMargin As Currency
I changed them to this
Public gLeftMargin As Currency
Public gRightMargin As Currency
Public gTopMargin As Currency
Public gBottomMargin As Currency
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bug 1. I'm not clear on what the issue is. When I go to print preview it shows a single page at a time and I have to explicitly change pages to see another page.
Bug 2. You can change the increment to anything you want by editing the Form_Load sub in frmPageSetup and changing each of these blocks of code
For i = m To n Step 0.05
frmPageSetup.cboLeftMargin
Next
to whatever increment you'd like to use. To change the increment change 0.05 to some other value. For example, a value of 0.01 would allow a much finer choice of margin settings. To change the number of increments, change the value of "n" (right now it's 4) to some other number.