473,848 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drawing vertical string

Hello,

the following code draws 'top to bottom' vertical text,
any ideas how to draw 'bottom to top' one?
g.DrawString("T his is a test vertical string", New Font("Tahoma", 8,
FontStyle.Regul ar), New SolidBrush(Colo r.Gray), 100, 10, New
StringFormat(St ringFormatFlags .DirectionVerti cal))

I would gratefully appreciate any help

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

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

Ahmed

Adriano wrote:
Hello,

the following code draws 'top to bottom' vertical text,
any ideas how to draw 'bottom to top' one?
g.DrawString("T his is a test vertical string", New Font("Tahoma", 8,
FontStyle.Regul ar), New SolidBrush(Colo r.Gray), 100, 10, New
StringFormat(St ringFormatFlags .DirectionVerti cal))

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*******@gmai l.com> wrote in message
news:11******** **************@ r2g2000cwb.goog legroups.com...
Hi Adriano,

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

Ahmed

Adriano wrote:
Hello,

the following code draws 'top to bottom' vertical text,
any ideas how to draw 'bottom to top' one?
g.DrawString("T his is a test vertical string", New Font("Tahoma", 8,
FontStyle.Regul ar), New SolidBrush(Colo r.Gray), 100, 10, New
StringFormat(St ringFormatFlags .DirectionVerti cal))

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.Regul ar)
Using brush As System.Drawing. SolidBrush = New
SolidBrush(Colo r.Gray)
Using format As System.Drawing. StringFormat = New
StringFormat(St ringFormatFlags .DirectionVerti cal)
Dim location As System.Drawing. Point = New
Point(ClientSiz e.Width \ 2, ClientSize.Heig ht \ 2)
Dim transform As System.Drawing. Drawing2D.Matri x =
e.Graphics.Tran sform
transform.Rotat eAt(180, location)
e.Graphics.Tran sform = transform
e.Graphics.Draw String("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.i t> wrote in message
news:Oq******** ******@TK2MSFTN GP02.phx.gbl...
| Hello,
|
| the following code draws 'top to bottom' vertical text,
| any ideas how to draw 'bottom to top' one?
| g.DrawString("T his is a test vertical string", New Font("Tahoma", 8,
| FontStyle.Regul ar), New SolidBrush(Colo r.Gray), 100, 10, New
| StringFormat(St ringFormatFlags .DirectionVerti cal))
|
| 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
4837
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 code will trace these coordinates on the image and draw the line between these two points. Can anyone please help me in writing the javascript code of this problem? Thanks and Regards Atif
8
22456
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 simplicity sake, I would be prepared to draw using characters such as _ or * if proper line drawing is really complicated. Thanks in advance. Walt
10
2331
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
2257
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 specific position in according to value of some controls, track bars, for example. Next read the track bars value to find the coordinates of lines cross. It works, but I can not get real cross because the background image is being deface by lines...
1
3572
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 all the font metrics,but if someones got something simpler, I would appreciate it. Thanks Mike
11
4378
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 lines) on a trace so they can measure the time difference between markers. Once they click on a desired location, on a trace, arrow buttons are provided so they can move the marker to an exact location. With xor, I just redraw the current marker to...
4
3036
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 one manually using the DrawLine function or I could use the Windows graphics libraries to squash a perfect circle and rotate it... Is there an easier way to accomplish this or will I have to resort to manual
1
7871
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 thickness of the lines in this instance using VBA. I want to set the thickness at 1pt. Can anyone suggest a way of doing this please? ' This is the spacing between the right edge of the ' control and the Vertical Separation Line intLineMargin = 0
0
1403
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 drawing and measuring text because Graphics.DrawString and Graphics.MeasureString does not come with a "NoPadding" option. When drawing superscripts and subscripts, I'll specify the x-position as the width of the normal text. This works fine for regular...
0
9735
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10718
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10347
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7067
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5731
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5917
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4134
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.