Adding chr(0) does not work this end, I have got around it by doing lctext +
"X" when passing the string to the MeasureString method.

So moving on, how difficult is it to use the picture we have created on a
report using report listeners?

I already have a listener in place which changes the size of the font on a
textbox based on its contents.

Cheers

Chris.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Cesar
Sent: 26 November 2007 14:34
To: profox
Subject: RE: GDI+

Hi Chris,

Thnaks for the kind words.

I'm aware of that.
Unfortunately, the GDI+ function does not return so accurate measurements.

I hope to publish some other ways, (and accurate) in the future.

For now, just adding a chr(0) to your string should do the required trick.

Make your new string to: "AAA AAA AAA" + CHR(0)

Hope this helps

Cesar


---------- Início da mensagem original ----------- 
De: [EMAIL PROTECTED] 
Para: [EMAIL PROTECTED] 
Cc: 
Data: Mon, 26 Nov 2007 13:43:13 -0000 
Assunto: RE: GDI+ 
> Cesar, 
> 
> Thank you so much for this example, it's really great when someone does a 
> example of something which is relevant to the question as it gives me a 
> great help getting my head into this GDI stuff. 
> 
> The whole GdiPlusX project is absolutely excellent, my hats off to those 
> involved. 
> 
> I have a question about your example, and in a way its pretty much the
same 
> as where I was upto with my own autofit routine using textbox's and 
> fontsize. 
> 
> In your example if you changed the string to "AAA AAA AAA" the last A gets

> truncated in the image. Is there a way to measure accurately how much
space 
> will be required so that text does not get truncated or will I end up
doing 
> what I am doing now and using a padded string when calculating the space 
> needed. 
> 
> TIA 
> 
> Chris. 
> 
> -----Original Message----- 
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

> Of Cesar 
> Sent: 24 November 2007 14:38 
> To: [email protected] 
> Subject: Re: GDI+ 
> 
> I`ve put a sample for you here: 
> "How to create text as image file with GdiPlusX" 
> http://weblogs.foxite.com/cesarchalom/archive/2007/11/24/5428.aspx 
> 
> Hope this helps 
> 
> Cesar 
> 
> 
> ----- Original Message ----- 
> From: "Chris Davis" 
> To: 
> Sent: Wednesday, November 21, 2007 6:59 AM 
> Subject: Re: GDI+ 
> 
> 
> Thanks Frederic, I am going to follow that article through later today. 
> 
> On 20/11/2007, Frédéric Steczycki wrote: 
> > 
> > Okokok 
> > 
> > There's an article from foxtalk here as for a start: 
> > http://msdn2.microsoft.com/en-us/library/ms947605.aspx 
> > 
> > and a classes here : 
> > http://weblogs.foxite.com/cesarchalom/archive/2006/08/10/2194.aspx 
> > 
> > 
> > Frédéric Steczycki 
> > 
> > 
> > > -----Message d'origine----- 
> > > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

> > > De la part de Chris Davis 
> > > Envoyé: 20 novembre 2007 15:22 
> > > À: [EMAIL PROTECTED] 
> > > Objet: GDI+ 
> > > 
> > > Is it possible to turn text into an image using GDI+ ? 
> > > 
> > > Cheers 
> > > 
> > > Chris. 
> > > 
> > > 
> > > --- StripMime Report -- processed MIME parts --- 
> > > multipart/alternative 
> > > text/plain (text body -- kept) 
> > > text/html 
> > > --- 
> > > 
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to