Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

fix print preview for rtf

Posted on 2005-05-10
7
Medium Priority
?
167 Views
Last Modified: 2010-05-01
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?
0
Comment
Question by:isnoend2001
  • 2
  • 2
5 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 14003689
Hi, isnoend2001.

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.AddItem FormatNumber(i, 2)
    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.  
0
 

Author Comment

by:isnoend2001
ID: 14003895
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
0
 
LVL 76

Expert Comment

by:David Lee
ID: 14004129
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.
0
 

Author Comment

by:isnoend2001
ID: 14004405
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
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 14597388
PAQed with points (500) refunded

DarthMod
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question