473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Printing - Right Justified

Hi All ...

I'm trying to print some text (for an automated letter) right justified
using the printdocument classes.

I know how to determine the left and right margins, but how do I set the
starting point for a string of text so that it finishes printing at the
right most margin?

--
Regards Luke.
-----
There are 10 types of people in this world
Those that understand binary and those that don't
-----
Nov 21 '05 #1
1 2868
"Luke Vogel" <not@_real_address> schrieb:
I'm trying to print some text (for an automated letter) right justified
using the printdocument classes.

I know how to determine the left and right margins, but how do I set the
starting point for a string of text so that it finishes printing at the
right most margin?


\\\
Dim sf As New StringFormat()
sf.Alignment = StringAlignment.Far
e.Graphics.DrawString( _
"Hello World" & ControlChars.NewLine & "Bla", _
Me.Font, _
SystemBrushes.ControlText, _
New RectangleF(10, 10, 100, 100), _
sf _
)
sf.Dispose()
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bob Greschke | last post by:
Howdy! I have a Python/MySQL program that produces HTML pages from some items in our inventory database. These pages are varying numbers of 1-row, 3-column tables whose first column is a...
5
by: Stan Shankman | last post by:
How do I add trailing spaces within a right-justified textBox? In order to add a trailing space to the text in a right-justified textBox, I use to just append a space to the end of the text...
2
by: Glenn Lerner | last post by:
I have Label controls with TextAlign property set to MiddleRight. For some reason, the text doesn't always shift all the way to the right. Example: If I put "10" it seems to be shifted all the...
1
by: Stephen Martinelli | last post by:
Hello all How can i right justify numeric field on a report. Currently, all my numbers are left justified and i cant figure out how to change them to right. Thanks steve
4
by: Austin Powers | last post by:
I want to (on one line) show something like the following ------------------------------------------------------- left centered right...
2
by: Beaumier | last post by:
Hi guys! I need to print a report (not a form) that has columns of numbers on a LQ300+ dot matrix printer with visual basic 6. The problem is the columns are never justified properly even when I...
8
by: trbosjek | last post by:
A total newbie. This simple example below prints left justified. How do I make it right justified, as a number should be? It works for smaller integers (other than unsigned long long). #include...
14
by: wshaer | last post by:
Hi all, I have an assignment and I need some help with it. This is the assignment // Research reports are often required to conform to a given standard such as APA or MLA. These standards...
8
by: joemacbusiness | last post by:
Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial:...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.