L
Leonard Lee
Hi all,
I know that Environment.NewLine is not available in Microsoft .NET
Compact Framework.
I am using Compact Framework 2.0 SP2.
I have tried to include "\r\n" or "\n" inside a string to be display
as a Text to that user control. The Text will be display like a label
inside the custom user control.
However, I am using Graphics.DrawString(Text, Font, mySolidBrush,
myClientRectangle, myFormat) to display the string.
For example, my string is "The First Line \n The Second Line",
The Text will be display like "The First Line [] The Second Line" if
"\n" existed in the string.
However, The Text will be display like "[] [] [] [] [] [] [] [] [] []
[] [] [] [] [] [] []" (displays and draws continuously causing my
system to have high resource usage) if "\r\n" existed in the string. I
do not know what went wrong.
I have tried both String and StringBuilder to append the "\r\n" but to
no avail.
Please advice.
Thanks in advance.
I know that Environment.NewLine is not available in Microsoft .NET
Compact Framework.
I am using Compact Framework 2.0 SP2.
I have tried to include "\r\n" or "\n" inside a string to be display
as a Text to that user control. The Text will be display like a label
inside the custom user control.
However, I am using Graphics.DrawString(Text, Font, mySolidBrush,
myClientRectangle, myFormat) to display the string.
For example, my string is "The First Line \n The Second Line",
The Text will be display like "The First Line [] The Second Line" if
"\n" existed in the string.
However, The Text will be display like "[] [] [] [] [] [] [] [] [] []
[] [] [] [] [] [] []" (displays and draws continuously causing my
system to have high resource usage) if "\r\n" existed in the string. I
do not know what went wrong.
I have tried both String and StringBuilder to append the "\r\n" but to
no avail.
Please advice.
Thanks in advance.