-
March 28th, 2011, 02:35 PM
#1
[RESOLVED] Rotating text
The reason why I want to do this is a little much to get into, but how can I rotate text by 90 degrees?
-
March 28th, 2011, 04:26 PM
#2
Re: Rotating text
Use Silverlight, or WPF or DirectDraw
-
March 29th, 2011, 02:49 AM
#3
Re: Rotating text
No need for any of those....
All you need is the DrawString method of the Drawing class.
DO the following :
Add 2 buttons to a new form, then type this :
Code:
Imports System.Drawing
Imports System.Drawing.Drawing2D
Public Class Form1
Private Sub btnTopToBottom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTopToBottom.Click
Dim g As Graphics = Me.CreateGraphics
g.TranslateTransform(50, 50)
g.RotateTransform(-90)
g.DrawString("Testing 1", Me.Font, New SolidBrush(Color.Black), 0, 0)
End Sub
Private Sub btnBottomToTop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBottomToTop.Click
Dim g As Graphics = Me.CreateGraphics
g.TranslateTransform(70, 50)
g.RotateTransform(90)
g.DrawString("Testing 2", Me.Font, New SolidBrush(Color.Azure), 0, 0)
End Sub
End Class
Really not difficult at all with the built in drawing capabilities
-
March 31st, 2011, 01:32 AM
#4
-
March 31st, 2011, 01:36 AM
#5
Re: [RESOLVED] Rotating text
Cool, I'm happy that it worked.
Good work
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|