473,383 Members | 1,922 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,383 software developers and data experts.

the height of a string

Hi,
is there a way to know the height of a string printed in a rectangle? I
mean. I would like to create a rectangle high enough to contain all the
string but I don't want to increase the width so I have to determine the
height the string will have when printed in order to create a high enough
rectangle.

Is there an easy way to know the height of the rectangle I must create in
order to contain all my string?

thanks

ThunderMusic

Nov 22 '05 #1
2 1259
Check out Graphics.MeasureString Method (String, Font)

Nov 22 '05 #2
it worked great, thanks!!

"Rulin Hong" <Ru*******@discussions.microsoft.com> a écrit dans le message
de news:31**********************************@microsof t.com...
Check out Graphics.MeasureString Method (String, Font)

Nov 22 '05 #3

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

Similar topics

1
by: IC | last post by:
Hi - I have a question about the following code: <script> document.write('<span id="outter" style="position:relative;">'); document.write("<object...
3
by: Zsolt Koppany | last post by:
Hi, I use dynamic menus and would like to know how I can figure out the height of a text (for exalple "Product"). I need it to calculate text positions. Zsolt
3
by: rufus | last post by:
I am created a table dynamically and I have wrapped it in a div tag so that the user can scroll the table horizontally ie I have added an overflow property to the div. I dont want the user to be...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
2
by: Tor Inge Rislaa | last post by:
How to change row height in a DataGrid I have DataGrid that is filled with data from a table in a DataSet. The content of the cells is text of more than one line (as a note field). What I...
3
by: yxq | last post by:
Hello, I use the com component "shockwave flash object" to play flash file, but how to get the actual size (width*height) of flash file but no control size? thank you!
2
by: ThunderMusic | last post by:
Hi, is there a way to know the height of a string printed in a rectangle? I mean. I would like to create a rectangle high enough to contain all the string but I don't want to increase the width so...
1
by: polocar | last post by:
Ciao a tutti, leggendo qua e là per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non è possibile impostare la sua...
8
by: fredo | last post by:
This question was asked in comp.lang.javascript with no result. In IE5.x and IE6, I want to display an image when the user rolls over a text link. The image does indeed display, but only on the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.