?
Solved

Drawing Vertical Text

Posted on 2004-09-15
2
Medium Priority
?
299 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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