VB.NET Drawing.Graphics and rotated text

this request for help is for anyone who knows how to draw rotated text in vb.net

i know "how" to do it, as in the function calls, but it doesnt make any sense to me now to position anything.

im looking for this help to further develop launcher (yea its still around and being developed slowly)

what i want to do is the following:

the following image is what launcher looks like when its docked to the top of the screen

1.gif

and i would like to be able to dock launcher to the left and right of the screen as well... so it would look like so:

2.gif

but i cannot for the life of me get it even close to that... the text is not even viewable, its off to the side somewhere, and i cannot find a consistent (or even correct way at this point) to getting the text to show in the correct position.

any guidance would be greatly appreciated.

thanks everyone!

mmanson132

edit: sorry if the tag is missing... i saw what looks like a new dropdown on the create thread page and i thought that would take are of tags... oops

#362303

All the help I could hope to provide is to direct you here:

http://www.bobpowell.net/angletext.htm

http://www.bobpowell.net/ReverseAxisText.htm

Hope it helps.

#362403

Personally I like using a Matrix and GraphicsContainer, the speed seems to be top notch, and it's been alot more flexible for me than Bob's methods. (And it's what I use in Kapsules as well)

Just some example methods I pulled from the net...

Public Sub BeginRotate(ByVal iAngle As Single, ByVal Optional px As Integer = 0, ByVal Optional py As Integer = 0)

If (iAngle <> 0!) Then

iAngle = (iAngle - 0.0001!)

Dim matrix1 As Matrix = Me.oGraphics.Transform

Dim tf1 As New PointF(CType(px, Single), CType(py, Single))

Me._Container = Me.oGraphics.BeginContainer

matrix1.RotateAt(iAngle, tf1, MatrixOrder.Append)

Me.oGraphics.Transform = matrix1

End If

End Sub



Public Sub EndRotate()

If (Not Me._Container Is Nothing) Then

Me.oGraphics.EndContainer(Me._Container)

Me._Container = Nothing

End If

End Sub

#384898

thanks! i will try it as soon as i get a chance.

what do i need to include for Matrix type?

and do you have a more in depth example? like a demo app with source code i can look at?

thanks again andrew

nevermind, figured out the matrix part, but im still not sure how to use it, please attach full demo app/source code if possible, thanks again!

#385763