<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Rotate text on label?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : Rotate text on label?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 08:12:47 +0000</pubDate>
  <lastBuildDate>Sat, 09 Jan 2010 12:38:00 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=15743</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Rotate text on label? : There are many ways to do it...  In...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15743&amp;PID=56055&amp;title=rotate-text-on-label#56055</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3733">Krog</a><br /><strong>Subject:</strong> 15743<br /><strong>Posted:</strong> 09 January 2010 at 12:38pm<br /><br />There are many ways to do it...<br /><br />In <strong>VB6</strong> we can use the CreateFont API function. Check the following test project:<br /><br /><a href="uploads/20100109_120027_RotateText.rar" target="_blank">20100109_120027_RotateText.rar</a><br /><br /><br />Another way would to be printing the text in a PictureBox and then rotating it using GetPixel and SetPixel, but it is more difficult.<br /><br /><br />In <strong>VB.Net</strong> we can use this:<br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> Public Class Form1<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;Public Sub RotateText(ByVal g As Graphics, ByVal MyFont As Font, ByVal MyText As String, ByVal Angle As Single, ByVal MyBrush As Brush, ByVal X As Single, ByVal Y As Single)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; While Angle &gt; 360<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Angle = Angle - 360<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End While<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; While Angle &lt; 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Angle = Angle + 360<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End While<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Create a matrix and rotate it n degrees.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim MyMatrix As New System.Drawing.Drawing2D.Matrix<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyMatrix.Rotate(Angle, Drawing2D.MatrixOrder.Append)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Draw the text to the screen after applying the transform.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.Transform = myMatrix<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g.DrawString(MyText, MyFont, MyBrush, X, Y)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;End Sub<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim NewFont = New Font("Arial", 12, FontStyle.Bold)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Subroutine to alter text angle.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RotateText(e.Graphics, NewFont, "Hello World", -45, Brushes.DarkBlue, 10, 100)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;End Sub<br />End Class</td></tr></table><br /><br />In <strong>VB.NET with XAML</strong> we can use also the RenderTransform or LayoutTransform.<br /><br />The Codejock markup does not support these transformation functions.<br /><br />]]>
   </description>
   <pubDate>Sat, 09 Jan 2010 12:38:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15743&amp;PID=56055&amp;title=rotate-text-on-label#56055</guid>
  </item> 
  <item>
   <title><![CDATA[Rotate text on label? : I don&amp;#039;t think make this possible....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15743&amp;PID=55297&amp;title=rotate-text-on-label#55297</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4669">gibra</a><br /><strong>Subject:</strong> 15743<br /><strong>Posted:</strong> 01 December 2009 at 3:56am<br /><br />I don't think make this possible. <img src="http://forum.codejock.com/smileys/smiley5.gif" border="0"><DIV>&nbsp;</DIV><DIV>You can&nbsp;<U>only</U> dispose text vertically (not rotate):</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>&nbsp;&nbsp;&nbsp; With lblVertical<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Alignment = xtpAlignCenter<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Font.Name = "Tahoma"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Font.Size = 8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Height = 1650<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Font.Bold = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Width = 120<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Caption = "V" &amp; vbCr &amp; "E" &amp; vbCr &amp; "R" &amp; vbCr &amp; "T" &amp; vbCr &amp; "I" &amp; vbCr &amp; "C" &amp; vbCr &amp; "A" &amp; vbCr &amp; "L"<BR>&nbsp;&nbsp;&nbsp; End With<BR></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 01 Dec 2009 03:56:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15743&amp;PID=55297&amp;title=rotate-text-on-label#55297</guid>
  </item> 
  <item>
   <title><![CDATA[Rotate text on label? : Is there any simple way (using...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15743&amp;PID=55259&amp;title=rotate-text-on-label#55259</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4225">chrisABC</a><br /><strong>Subject:</strong> 15743<br /><strong>Posted:</strong> 29 November 2009 at 8:20am<br /><br />Is there any simple way (using CJ controls) to display a label with text rotated 90 degrees?<br>ie text going vertically down the page instead of horizontal?<br><br><br>]]>
   </description>
   <pubDate>Sun, 29 Nov 2009 08:20:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15743&amp;PID=55259&amp;title=rotate-text-on-label#55259</guid>
  </item> 
 </channel>
</rss>