Solved

Drawing Vertical Text

Posted on 2004-09-15
2
296 Views
Last Modified: 2010-04-15
I am currently learning GDI+ and have come across the need to write vertical text onto a form. How would one go about doing that?
0
Comment
Question by:Thora_Fan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 250 total points
ID: 12072198
See the following samples

Public void DrawVerticalString()
{
  System.Drawing.Graphics  formGraphics ;
   String  drawString ;
  System.Drawing.Font drawFont;
 System.Drawing.SolidBrush drawBrush;
formGraphics = System.Drawing.Graphics = Me.CreateGraphics();
     drawString = "Sample Text";
     drawFont = New System.Drawing.Font("Arial", 16);
     drawBrush = new      System.Drawing.SolidBrush(System.Drawing.Color.Black);
    Single x  = 150.0;
    Single y  = 50.0;
    System.Drawing.StringFormat()
drawFormat = new System.Drawing.StringFormat();
    drawFormat.FormatFlags = StringFormatFlags.DirectionVertical
        formGraphics.DrawString(drawString, drawFont, drawBrush, _
        x, y, drawFormat);
    drawFont.Dispose();
    drawBrush.Dispose();
    formGraphics.Dispose();
}
End Sub


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbcode/html/vbtskCodeExampleDrawingTextOnForm.asp

http://www.syncfusion.com/FAQ/WinForms/FAQ_c73c.asp
0
 

Expert Comment

by:walletless
ID: 12077702
Class cl = new System.Drawing.StringFormat();
cl.FormatFlags = StringFormatFlags.DirectionVertical;
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question