How about like this.
\\\
Private Sub Form_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) _
Handles MyBase.Paint
Dim MyString As String = "1-2-3-4-5"
If CheckBox1.Checked Then
Dim MyChar() As Char = MyString.ToCharArray
Array.Reverse(MyChar)
MyString = New String(MyChar)
End If
Dim BufferSize As Size = e.Graphics.MeasureString(MyString, Font).ToSize
Dim Buffer As New Bitmap(BufferSize.Width, BufferSize.Height)
Dim g As Graphics = Graphics.FromImage(Buffer)
g.Clear(BackColor)
g.DrawString(MyString, Font, Brushes.Black, 0, 0)
Buffer.RotateFlip(RotateFlipType.Rotate270FlipNone)
e.Graphics.DrawImage(Buffer, 0, 0)
g.Dispose()
Buffer.Dispose()
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Invalidate()
End Sub
///
p.s. You can rotate the graphics object instead of drawing to a bitmap
first, but I found that can cause odd behaviour on transparent child
controls of a transparent parent, so I now always draw to a bitmap and
rotate that.

Signature
Mick Doherty
http://dotnetrix.co.uk/nothing.html
> Hi,
>
[quoted text clipped - 5 lines]
> Word
> vertical ruler. How to implement it?
Jerry - 20 Dec 2004 14:39 GMT
Thank you!
Does MS provide any other ways to implement it?
> How about like this.
>
[quoted text clipped - 38 lines]
> > Word
> > vertical ruler. How to implement it?
Mick Doherty - 20 Dec 2004 15:46 GMT
If you're looking for some simple method like:
DrawReversedRotatedString(e.Graphics, MyString, Me.Font, x, y, 270)
then AFAIK no, not off the shelf.
The standard approach would be to translatetransform the graphics object,
and most of the time that method is acceptable, but I found that it caused
the graphics to be redrawn on transparent children of transparent
parentcontrols. In other words, what ever was painted at point(0,0) on the
transparent parent would be painted at point(0,0) of the transparent child.
At least that was the result on my custom controls, whereas drawing to
bitmap, rotating it and then drawing the bitmap to my controls did not have
this result.
If you mean to reverse the string then in Microsoft.VisualBasic there is a
strReverse method.
\\\
ReverseString = strReverse(MyString)
///
but no equivelant in C#.

Signature
Mick Doherty
http://dotnetrix.co.uk/nothing.html
> Thank you!
>
[quoted text clipped - 51 lines]
>> > Word
>> > vertical ruler. How to implement it?