Given a string, the font, fontstyle and fontsize how do i calculate the
rectangle that will hold it ?
thanks. 5 1482
"Karthik Seetharaman" <vz******@nospam.verizon.net> wrote in message
news:J1*******************@nwrddc01.gnilink.net... Given a string, the font, fontstyle and fontsize how do i calculate the rectangle that will hold it ?
Use the method 'Graphics.MeasureString', for a given graphics object
context.
"Karthik Seetharaman" <vz******@nospam.verizon.net> wrote in message
news:J1*******************@nwrddc01.gnilink.net... Given a string, the font, fontstyle and fontsize how do i calculate the rectangle that will hold it ?
Use the method 'Graphics.MeasureString', for a given graphics object
context.
hOSAM wrote: "Karthik Seetharaman" <vz******@nospam.verizon.net> wrote in message news:J1*******************@nwrddc01.gnilink.net...
Given a string, the font, fontstyle and fontsize how do i calculate the rectangle that will hold it ?
Use the method 'Graphics.MeasureString', for a given graphics object context.
Thanks. Can i figure out the font-size for a string given the
measurements where it is supposed to go ? I have a rectangular area the
width and height of which is fixed. I need t fit some strings in to that
area.
hOSAM wrote: "Karthik Seetharaman" <vz******@nospam.verizon.net> wrote in message news:J1*******************@nwrddc01.gnilink.net...
Given a string, the font, fontstyle and fontsize how do i calculate the rectangle that will hold it ?
Use the method 'Graphics.MeasureString', for a given graphics object context.
Thanks. Can i figure out the font-size for a string given the
measurements where it is supposed to go ? I have a rectangular area the
width and height of which is fixed. I need t fit some strings in to that
area.
Hello Karthik,
Check out the StringFormat class in GDI+ which can be used in DrawString
GDI+ function.
Regards,
Sujith.
"Karthik Seetharaman" <vz******@nospam.verizon.net> wrote in message
news:lB*******************@nwrddc02.gnilink.net... hOSAM wrote: "Karthik Seetharaman" <vz******@nospam.verizon.net> wrote in message news:J1*******************@nwrddc01.gnilink.net...
Given a string, the font, fontstyle and fontsize how do i calculate the rectangle that will hold it ?
Use the method 'Graphics.MeasureString', for a given graphics object context.
Thanks. Can i figure out the font-size for a string given the measurements where it is supposed to go ? I have a rectangular area the width and height of which is fixed. I need t fit some strings in to that area. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: pei_world |
last post by:
Hi there,
I have a problem about how to keep my draw graphics stay on my control
unless I delete them.
that means how to resist my graphics. also how to partially remove some
graphics from my...
|
by: David Sobey |
last post by:
Hi
I'm making a custom component using GDI+, a calendar grid thingy. I paint
the grid and numbers in my overrided OnPaint. However, when i go to paint
other things at other times in other...
|
by: Brian Basquille |
last post by:
Another question for ye all..
How do i check if a Region has entered another region?
Up until now, i've been checking if rectangles (or images converted into
Rectangles) have been visible in a...
|
by: |
last post by:
We create VC++ programs that does some GDI drawing functionality.
I discovered GDI+ and this seems to be a big step forward, and appears to be
standard available in Windows XP and Windows Server...
|
by: jack |
last post by:
In using GDI+ drawstring, if the string to be drawn is in
rtf format, how do I make GDI+ to recognize the rtf
attributes.
In other words, how do I draw one string in GDI+ , within
which the...
|
by: lgbjr |
last post by:
Hello All,
I have some pictureboxes on a VB.NET form that are linked to an AccessDB. If
the user wishes to open or edit an image, I need to save the image in the
picturebox to a temp file, then...
|
by: SStory |
last post by:
Question #1)
If I do Image.Save with the same filepath that I got the image from, it
bombs with "A generic error occurred in GDI+"
Any ideas? I prompt the user before overwriting, but if they...
|
by: davetelling |
last post by:
I am not a programmer, I'm an engineer trying to make an interface to a
product I'm designing. I have used C# to make a form that interrogates the
unit via the serial port and receives the data. I...
|
by: Chris Dunaway |
last post by:
When working with GDI+, calling the CreateGraphics method to draw on a
control has normally been frowned upon and it is always emphasized to
dispose of pens and brushes and other GDI objects lest...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
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...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |