473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Drawing text vertically

Greetings!
I develop a Multiple Windows Forms application in Microsoft Visual
Studio C++ .NET 2003 and I have a problem with string drawing. I can
draw it vertically, but I need to turn the strings 180°. I use the
Invalidate() function and call the Paint event:

private: System::Void groupBox2_Paint(System::Object * sender,
System::Windows::Forms::PaintEventArgs * e){

e->Graphics->DrawString(Voltage,new
System::Drawing::Font("TimesNewRoman",12),new
SolidBrush(Color::Black),50*FACX,410*FACX,new
StringFormat(StringFormatFlags::DirectionVertical) );

}
But, as I know, the "StringFormatFlags" does not give me the
possibility to spin the string 180°. Any idea of how to spin it is
welcome.

Marcelo Roggia Schio

Nov 17 '05 #1
2 1266
Hi Marcelo!
But, as I know, the "StringFormatFlags" does not give me the
possibility to spin the string 180°. Any idea of how to spin it is
welcome.


Yes, this is a problem...
We used a Matrix-Conversion:
<C#>
Matrix myMatrix = new Matrix();
myMatrix.Rotate(180, MatrixOrder.Append);
myMatrix.Translate(rect1.Width,rect1.Height*2,Matr ixOrder.Append);
e.Graphics.Transform = myMatrix;
</C#>

rect1 is the "ClientRectangle".

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2
Very good, thank you!
It wouldn't have been easy to find it out alone...
Marcelo Roggia Schio

Nov 17 '05 #3

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

Similar topics

5
by: Wilhelm Kutting | last post by:
Hi i want to use the following layout: ----------------- | | | | Text line 1 | | | Text line 2 | image.jpg | | ... | | | | | |
6
by: Jerry Camel | last post by:
I want to center an image on the screen and have text centered over the image. What's the best way to do this? I've been playing with style tags and I can get the stuff to center automatically...
3
by: Eduard Witteveen | last post by:
Hello list, I have code the draw MyDrawingObject information on a System.Drawing.Graphics object. The code is more/less the following: I now want to rotate / mirror the object i draw. I've...
11
by: panic attack | last post by:
Hello everbody, Our system is using Sql Server 2000 on Windows XP / Windows 2000 We have a text file needs to be imported into Sql Server 2000 as a table. But we are facing a problem which is,...
18
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I...
0
by: pamelafluente | last post by:
Hello experts, I need some help to do in a proper way what I am doing. I have some "cells" in a web page. Each "cell" is made of 2 DIV. One is inside the other. Example with 2 "cells" : <div...
3
by: vtashore | last post by:
I downloaded Steve Leban's RTF2 control and it works as advertised. Good news! After reading reference material on the RTF standard codes, I have been able to write update queries to universally...
4
by: avi | last post by:
Hello, I am trying to vertically center text in a background image, I found a solution on this site that sets the line-height to the height of the background image. This works just fine, except...
1
by: Maxime | last post by:
Hello, I want to make a button that automatically resizes according to the text length and the font size (which can be changed in firefox pretty easily with the browser). The button already...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.