• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Scaling down printing

Hello,

I created a program in Visual Basic 6 (DAO) in which I print the contents of an MSFlexgrid and then a MSchart. My question is, what is the code to scale down the output so that everything fits to one page (sort of like the fit all to one page when printing in Excel). Any help would be greatly appreciated. Thank you.

Janny
0
Janny
Asked:
Janny
2 Solutions
 
InteractiveMindCommented:
Janny,

4 days have gone with no useful responses. Although the rules state that you don't need to close the thread until 28 days after the last response, you will probably find that my response is the only one which you're going to get in this Thread.

Thus, I would recommend that you either request a Deletion and Refund of points, or if you still require a solution (which is probably the case), then request that this thread is moved into the VB Topic Area; where it is more likely to get notice.

Incase you're unfamiliar with requesting deletion & refunds, or requesting a move, you simply need to post a 0 point thread in the Community Support: http://www.experts-exchange.com/Community_Support/askQuestion.jsp  --  with a link to this thread, and explain what you wish to happen (whether it's deletion, or a move).

Good luck with it,
Rob.
0
 
JannyAuthor Commented:
Thank you for the advice InteractiveMind.

Janny
0
 
aikimarkCommented:
Janny,

This is usually accomplished by finding the more restrictive value between page height and page width.  Do your scaling to that restriction.

Example 1 (width more restrictive)
In this scenario, the sum of the column widths (= number of columns * column widths) for your grid component are much larger than the sum of row heights (= number of rows * row height) + height of chart .

Your solution is to do either of the following:
a. reduce the font size for the grid and adjust the column widths until the grid will fit onto the available page width.
b. produce an image of the page (on a picturebox control) much larger than the printed page and then transfer the image of the page to the printed page with scaling that will reduce it to fit onto one page.

Example 2 (height more restrictive)
In this scenario, the sum of the row heights + chart height is larger than the page height but the width is ok

Your solution is to do either of the following:
a. reduce the font size for the grid and adjust the column heights until the grid will fit onto the available page height.  Reduce the height of the chart so that it is proportional to the grid height.  Maintain the height:width ratio of the chart.
b. produce an image of the page (on a picturebox control) much larger than the printed page and then transfer the image of the page to the printed page with scaling that will reduce it to fit onto one page.

If both the height and the width are restrictive, pick the one that will result in the least amount of reduction.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now