Click here to Skip to main content
16,008,183 members
Home / Discussions / C#
   

C#

 
GeneralRe: TraceListener.Close not called when added through config file... Pin
Ryan Cromwell26-Feb-04 10:48
Ryan Cromwell26-Feb-04 10:48 
GeneralRe: TraceListener.Close not called when added through config file... Pin
Ryan Cromwell26-Feb-04 11:02
Ryan Cromwell26-Feb-04 11:02 
GeneralRe: TraceListener.Close not called when added through config file... Pin
John Fisher26-Feb-04 11:09
John Fisher26-Feb-04 11:09 
GeneralQuestion on resizing a non-rectangular form Pin
Flack26-Feb-04 9:47
Flack26-Feb-04 9:47 
GeneralRe: Question on resizing a non-rectangular form Pin
John Fisher26-Feb-04 10:37
John Fisher26-Feb-04 10:37 
GeneralPanel Size to small Pin
Member 90966226-Feb-04 8:50
Member 90966226-Feb-04 8:50 
GeneralRe: Panel Size to small Pin
John Fisher26-Feb-04 10:41
John Fisher26-Feb-04 10:41 
QuestionMeasuring text - a bug in .NET? Pin
Judah Gabriel Himango26-Feb-04 8:42
sponsorJudah Gabriel Himango26-Feb-04 8:42 
The API call

StringFormat.SetMeasurableCharacterRanges(CharacterRange[])

will throw an Overflow exception if the CharacterRange[] parameter is greater than 32 elements long. For instance, the following code will throw an exception:

CharacterRange[] ranges = new CharacterRange[33]; // anything > 32

StringFormat format = new StringFormat();
format.SetMeasurableCharacterRanges(ranges); // <- throws an exception!


However, if ranges[] was <= 32 elements long, no exceptions are thrown. All of this is regardless of whether each CharacterRange element is initialized (of course, .NET initializes value types anyway). Looking throught the MSDN documentation, I see no mention of a length limit for the .SetMeasurableCharacterRanges method.

So I have 2 questions: is this a known bug or expected functionality? And what other options do I have for retrieving the character positions of text?

The graveyards are filled with indispensible men.
AnswerRe: Measuring text - a bug in .NET? Pin
Dave Kreskowiak26-Feb-04 16:58
mveDave Kreskowiak26-Feb-04 16:58 
GeneralRe: Measuring text - a bug in .NET? Pin
Judah Gabriel Himango26-Feb-04 19:08
sponsorJudah Gabriel Himango26-Feb-04 19:08 
GeneralRe: Measuring text - a bug in .NET? Pin
Dave Kreskowiak27-Feb-04 3:54
mveDave Kreskowiak27-Feb-04 3:54 
GeneralCD OPEN Pin
Anonymous26-Feb-04 8:03
Anonymous26-Feb-04 8:03 
GeneralRe: CD OPEN Pin
Nick Parker26-Feb-04 8:35
protectorNick Parker26-Feb-04 8:35 
GeneralRe: CD OPEN Pin
Daniel Turini26-Feb-04 8:43
Daniel Turini26-Feb-04 8:43 
GeneralRe: CD OPEN Pin
Nick Parker26-Feb-04 8:52
protectorNick Parker26-Feb-04 8:52 
GeneralROTD Pin
Mazdak26-Feb-04 9:11
Mazdak26-Feb-04 9:11 
GeneralRe: ROTD Pin
Nick Parker26-Feb-04 9:16
protectorNick Parker26-Feb-04 9:16 
GeneralRe: CD OPEN Pin
Heath Stewart26-Feb-04 12:26
protectorHeath Stewart26-Feb-04 12:26 
GeneralRe: CD OPEN Pin
Nick Parker26-Feb-04 17:15
protectorNick Parker26-Feb-04 17:15 
GeneralRe: CD OPEN Pin
Judah Gabriel Himango26-Feb-04 8:47
sponsorJudah Gabriel Himango26-Feb-04 8:47 
GeneralRe: CD OPEN Pin
Matthew Hazlett26-Feb-04 9:49
Matthew Hazlett26-Feb-04 9:49 
GeneralRe: CD OPEN Pin
Anonymous26-Feb-04 9:09
Anonymous26-Feb-04 9:09 
GeneralTransact-SQL calls from within C# Pin
betterc26-Feb-04 7:59
betterc26-Feb-04 7:59 
GeneralRe: Transact-SQL calls from within C# Pin
Mazdak26-Feb-04 8:13
Mazdak26-Feb-04 8:13 
GeneralRe: Transact-SQL calls from within C# Pin
turbochimp26-Feb-04 8:39
turbochimp26-Feb-04 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.