472,354 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

Drawing vertical string

Hello,

the following code draws 'top to bottom' vertical text,
any ideas how to draw 'bottom to top' one?
g.DrawString("This is a test vertical string", New Font("Tahoma", 8,
FontStyle.Regular), New SolidBrush(Color.Gray), 100, 10, New
StringFormat(StringFormatFlags.DirectionVertical))

I would gratefully appreciate any help

thanks,
Adriano
Jun 23 '06 #1
3 9623
Hi Adriano,

I don't know if there is one. But you can call StrReverse(yourString).

Ahmed

Adriano wrote:
Hello,

the following code draws 'top to bottom' vertical text,
any ideas how to draw 'bottom to top' one?
g.DrawString("This is a test vertical string", New Font("Tahoma", 8,
FontStyle.Regular), New SolidBrush(Color.Gray), 100, 10, New
StringFormat(StringFormatFlags.DirectionVertical))

I would gratefully appreciate any help

thanks,
Adriano


Jun 23 '06 #2
hello Ahmet,

thanks for your reply, that's just reverses the sentence,
what I actually need is to turn the word 180 degrees,
any other ideas?

regards,
Adriano

"Ahmed" <ah*******@gmail.com> wrote in message
news:11**********************@r2g2000cwb.googlegro ups.com...
Hi Adriano,

I don't know if there is one. But you can call StrReverse(yourString).

Ahmed

Adriano wrote:
Hello,

the following code draws 'top to bottom' vertical text,
any ideas how to draw 'bottom to top' one?
g.DrawString("This is a test vertical string", New Font("Tahoma", 8,
FontStyle.Regular), New SolidBrush(Color.Gray), 100, 10, New
StringFormat(StringFormatFlags.DirectionVertical))

I would gratefully appreciate any help

thanks,
Adriano

Jun 23 '06 #3
Adriano,
You should be able to use a rotation to have it draw "bottom to top"

Something like (VB 2005 syntax):

Using font As System.Drawing.Font = New Font("Tahoma", 8,
FontStyle.Regular)
Using brush As System.Drawing.SolidBrush = New
SolidBrush(Color.Gray)
Using format As System.Drawing.StringFormat = New
StringFormat(StringFormatFlags.DirectionVertical)
Dim location As System.Drawing.Point = New
Point(ClientSize.Width \ 2, ClientSize.Height \ 2)
Dim transform As System.Drawing.Drawing2D.Matrix =
e.Graphics.Transform
transform.RotateAt(180, location)
e.Graphics.Transform = transform
e.Graphics.DrawString("This is a test vertical string",
font, brush, location, format)
End Using
End Using
End Using

The quirk is getting the location right. At the rotation causes the
coordinates to be "turned upside down"...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Adriano" <ad*****@mail.it> wrote in message
news:Oq**************@TK2MSFTNGP02.phx.gbl...
| Hello,
|
| the following code draws 'top to bottom' vertical text,
| any ideas how to draw 'bottom to top' one?
| g.DrawString("This is a test vertical string", New Font("Tahoma", 8,
| FontStyle.Regular), New SolidBrush(Color.Gray), 100, 10, New
| StringFormat(StringFormatFlags.DirectionVertical))
|
| I would gratefully appreciate any help
|
| thanks,
| Adriano
|
|
Jun 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Atif | last post by:
Hello all, In my html page I want to add an image say of 800x600. Now I want that when ever I am given two coordinates on this image say (x1, y1)=(50, 100) and (x2, y2)=(200, 300), the java script...
8
by: john | last post by:
Hi I am a C++ newbie, I am looking to draw single lines and simple boxes in a C++ console window. Is there a draw command with x and y coordinates that can be used with my Dev C++ compiler. For...
10
by: Zach | last post by:
In an invoicing program I draw lines in a text file using: new string ("-",73) new string ("=",73) These lines look awful. Is there a better way? Much obliged.
2
by: George | last post by:
Dear colleagues, I refer to your help with specific graphic problem. It is necessary to create a viewfinder in graphic application. It seems that the algorithm is simple: just draw lines in...
1
by: AMP | last post by:
Hello, I am looking for sample code to draw text on an arc. I see the stringFormat.FormatFlags enum for vertical but nothing for arcs. I could do it with lenthy trig algorythm that would take in...
11
by: Galen Somerville | last post by:
In my opinion, one of the worst failures of Net (VB2005 Pro) was not providing an XOR line draw feature, as in VB6. A major feature of my app is allowing the user to draw Markers (vertical...
4
by: DM | last post by:
Hi All, I've recently been given the task of modifying some legacy VB 6 code to do with drawing rotated ellipses on a map at different zoom levels. I guess I could find a formula for drawing...
1
by: roryok | last post by:
I've got the following to draw a vertical line on each control followed by a rectangle around the Details section in a report. What I cannot seem to find in Access VBA Help is how to set the...
0
by: emilnordiclake | last post by:
(C#, Microsoft .NET Framework 3.5) Hello! I'm in the process of creating a custom text control and I want to add functionality for superscripts and subscripts. I'm using TextRenderer for...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.