Diagonal text on screen

Posted on 1999-07-20
Medium Priority
Last Modified: 2012-05-04
Does anyone know of a control or a way to print text out on the screen on a 45 degree angle.  What I am trying to do is, I have a grid with quite a few columns and I want to put the headers on  a 45 degree angle , that way i can have more columns showing at one time.  If you send code please comment it well.  Thanks in advance.
Question by:mread
  • 2

Accepted Solution

vettranger earned 180 total points
ID: 1526229
VideoSoft's VSView will do this, among others. If you poke around at www.vbxtras.com, you'll likely find a few controls that include this feature, at various price levels.

Another idea is to just create a graphic and load it into a picture box placed above your grid. If you by chance need to hide and show some of the columns at run time, create a uniqute grapic for each column combination. Most current graphics programs will let you rotate text in this fashion.


Expert Comment

ID: 1526230
A hard code solution, print directly on form using currentx,y position to place characters.

on form
list1 (for list of words could be array, collection, etc.)

Option Explicit

Private Sub Form_Load()
Me.FontName = "courier" 'better for uniform spaceing
Me.FontSize = 10 'set to suit
Label1.Visible = False
Label1.Width = TextWidth("M") * 5 'can be adjusted to fit grid

With List1
.AddItem "hello"
.AddItem "there"
.AddItem "world"
.AddItem "here"
.AddItem "I am"
.Visible = False
End With

Me.AutoRedraw = True
End Sub

Private Sub prntDiag()
Dim numWords, numChars, thestring

For numWords = 0 To List1.ListCount - 1
thestring = List1.List(numWords)
Me.CurrentX = Label1.Left
Me.CurrentY = Label1.Top

    For numChars = 1 To Len(thestring)
     Me.Print Mid(thestring, numChars, 1);
     Me.CurrentY = Me.CurrentY + TextHeight(Mid(thestring, numChars, 1))

Label1.Left = Label1.Left + (Label1.Width / 2)


End Sub


Author Comment

ID: 1526231
Thanks, the web link put me in the right direction to find what i needed.

Expert Comment

ID: 1526232
Happy to help. :-)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

587 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