Solved

Print RichTextBox spacing problems

Posted on 2004-08-25
6
321 Views
Last Modified: 2012-08-13
I print out a RichTextBox, Its usually about two A4 pages. On the computer screen It looks all equally spaced, that means even if there is a kind of table with columns and rows the entries are in the right position.
When I print it the layout changes and it is hard to identyfy tables in the text.
I think it is related to the fact that spaces are interpreted differently, or perhaps to the fact that there is no equal distance for each character.

Does anyone have an idea how to takle this problem??????

To print I used a code example on the internet:
http://www.freevbcode.com/ShowCode.Asp?ID=195

In general this works very good except of the mentioned problem
0
Comment
Question by:themroc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
x50Fade earned 300 total points
ID: 11899926
Yup.....this has also caused a lot of pain for me at one stage...

The problem is your font.....Try setting your font on the rich textbox to Lucida Console...

It's not such a nice font but your tabbing will work great and everything should be aligned the same way while running and while printed.

Hope this helps

P.S. Maybe there are some other fonts that also keeps tabbing and other stuff ok, but I have never really looked for another one as Lucida Console works just fine for me
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 11899953
Another thing.....

That's quite a long way to print from a rich textbox...and I bet it works great......but I normally just do the following:

1) I write whatever I want printed to a file, using tab(n); etc
2) Open the file in the rich textbox (rtfbox1.loadfile "filename")
3) Print the data in the textbox (trbox1.sellprint Printer.Hdc)
0
 

Author Comment

by:themroc
ID: 11901784
That really does the job, thanks a lot!!!
But I have only one Question remaining maybe you can help

This font is this installed on every machine runing under windows or is there the danger that I want to print a font which does not exist and than caus an error???
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:x50Fade
ID: 11910124
Yup, there is the danger.... but Lucida Console is allways installed with any default Windows installation....

Tried and tested with win98 to winxp

Cheers
0
 

Author Comment

by:themroc
ID: 11931440
thanks,
here are the points
>)
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 11931546
Thanks......

My first Points......I shall conquer this area...one-day!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

740 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