Click here to Skip to main content
15,892,161 members
Home / Discussions / C#
   

C#

 
GeneralRe: #import (C# equivelant) Pin
Christian Graus29-Jan-07 14:20
protectorChristian Graus29-Jan-07 14:20 
GeneralRe: #import (C# equivelant) Pin
teejayem29-Jan-07 14:50
teejayem29-Jan-07 14:50 
GeneralRe: #import (C# equivelant) [modified] Pin
teejayem29-Jan-07 15:14
teejayem29-Jan-07 15:14 
GeneralRe: #import (C# equivelant) Pin
Christian Graus29-Jan-07 15:52
protectorChristian Graus29-Jan-07 15:52 
GeneralRe: #import (C# equivelant) Pin
teejayem29-Jan-07 16:29
teejayem29-Jan-07 16:29 
QuestionNot sure of the best way to handle null values when not allowed Pin
~~~Johnny~~~29-Jan-07 8:30
~~~Johnny~~~29-Jan-07 8:30 
AnswerRe: Not sure of the best way to handle null values when not allowed Pin
bobsugar22230-Jan-07 11:30
bobsugar22230-Jan-07 11:30 
Questioncalc height from drawstring + wordwrap Pin
FreewareFire29-Jan-07 8:29
FreewareFire29-Jan-07 8:29 
Hi @all!

I've got an amazing problem... or better a driving me crazy problem...

i have this code in print event...

StringFormat strFormat = new StringFormat();
strFormat.Trimming = StringTrimming.None;
strFormat.FormatFlags = StringFormatFlags.NoClip;

RectangleF InfoRect = new RectangleF(curXPos, nCounter, (e.MarginBounds.Right - CurXPos), newFont.Height);
e.Graphics.DrawString("Hello World! Test Text", newFont, brush, InfoRect, strFormat);


as anyone can see: newFont is a Font var, brush a brush, InfoRect a RectangleF and strFormat the StringFormat...

Ok, the problem now is quite simple... or for me not:

if the Text doesn't fit to InfoRect it's wrapped to next line... my problem is, how do i calculate the height of the needed space - especially the height - if it's not wrapped it's no problem, but when it's wrapped, i don't know how to get the height - i need the height to be calculated before the text is drawn by DrawString !!! i draw a rectangle around my text... so i need to know the height before... any suggestions??? Thank you!!! All ideas are welcome...

Ralf


FreewareFire is in the House!

AnswerRe: calc height from drawstring + wordwrap Pin
Luc Pattyn29-Jan-07 10:08
sitebuilderLuc Pattyn29-Jan-07 10:08 
GeneralRe: calc height from drawstring + wordwrap Pin
FreewareFire29-Jan-07 10:16
FreewareFire29-Jan-07 10:16 
QuestionHow can I do some audioprocessing while playing... Pin
ComCoderCsharp29-Jan-07 8:22
ComCoderCsharp29-Jan-07 8:22 
AnswerRe: How can I do some audioprocessing while playing... Pin
Luc Pattyn29-Jan-07 10:09
sitebuilderLuc Pattyn29-Jan-07 10:09 
QuestionConsole.Writeline Pin
Brendan Vogt29-Jan-07 8:06
Brendan Vogt29-Jan-07 8:06 
AnswerRe: Console.Writeline Pin
Luc Pattyn29-Jan-07 8:13
sitebuilderLuc Pattyn29-Jan-07 8:13 
GeneralRe: Console.Writeline Pin
Brendan Vogt29-Jan-07 8:26
Brendan Vogt29-Jan-07 8:26 
Questionmicrosoft.pointofservice.dll Pin
Masterhame29-Jan-07 7:38
Masterhame29-Jan-07 7:38 
AnswerRe: microsoft.pointofservice.dll Pin
Cimperiali4-Mar-09 21:49
Cimperiali4-Mar-09 21:49 
QuestionDynamic crystal report Pin
Butterfly_h29-Jan-07 6:45
Butterfly_h29-Jan-07 6:45 
Questioncustom user control Pin
netJP12L29-Jan-07 6:35
netJP12L29-Jan-07 6:35 
AnswerRe: custom user control Pin
Not Active29-Jan-07 7:28
mentorNot Active29-Jan-07 7:28 
Questionswitching resources - at design time or compile time Pin
BlackDice29-Jan-07 6:09
BlackDice29-Jan-07 6:09 
AnswerRe: switching resources - at design time or compile time Pin
Luc Pattyn29-Jan-07 6:31
sitebuilderLuc Pattyn29-Jan-07 6:31 
GeneralRe: switching resources - at design time or compile time Pin
BlackDice29-Jan-07 7:44
BlackDice29-Jan-07 7:44 
GeneralRe: switching resources - at design time or compile time [modified] Pin
Luc Pattyn29-Jan-07 8:11
sitebuilderLuc Pattyn29-Jan-07 8:11 
QuestionC# problem! Pin
TuanNH8529-Jan-07 5:50
TuanNH8529-Jan-07 5:50 

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.