Drawing String Vertically

G

Guest

H
Can any body help me draw a string Vertically if I have a vertical rectangle
I have heard of Translate transform and RotateTransform but i don't know how to use it..
What exactly TranslateTransform does and Rotate Transform does??
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?TmlsZXNoIFJhZGU=?= said:
Can any body help me draw a string Vertically if I have a vertical rectangle?
I have heard of Translate transform and RotateTransform but i don't know how to use it...
What exactly TranslateTransform does and Rotate Transform does???

Did you have a look at the documentation (if you are using VB.NET
Standard or VS.NET, just set the caret on it and press the F1 key).

Sample code (I remember I already replied this code some time ago to a
question you asked):

\\\
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs _
) Handles MyBase.Paint
e.Graphics.RotateTransform(90)
e.Graphics.DrawString("Hello World!", Me.Font, Brushes.Blue, 0, 0)
End Sub
///
 
N

Nilesh Rade

Thanks Herfried

But am not able to draw it inside a rectangle.
Also am not able to understand by howmuch should i rotate to get the
string vertically printed....

I tried giving the 90 but it goes outside the form and is not
visible....
 
H

Herfried K. Wagner [MVP]

Nilesh,

* Nilesh Rade said:
But am not able to draw it inside a rectangle.
Also am not able to understand by howmuch should i rotate to get the
string vertically printed....

I tried giving the 90 but it goes outside the form and is not
visible....

You will have to use 'TranslateTransform' which set the point where the
string will be drawn.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top