Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / September 2005

Tip: Looking for answers? Try searching our database.

problem displaying strings in a text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DevX - 26 Sep 2005 09:06 GMT
Hi to all,

I have a text box that must display a string readed from a MSDE database.

In  Win2000/XP when a carriage return (e.g. where the user that entered the
string pressed ENTER) is encountered, I got a small box and the string don't
go to a new line.

In my developing machine, a Windows SBS 2003, this problem doesn't exists.

I know that this is a problem related to encoding/decoding of string,
someone as any idea how to avoid the problem in the Win2000/XP machines?

Thanks a lot and sorry for this newbie question...

DevX
Bob Powell [MVP] - 26 Sep 2005 10:03 GMT
Your strings don't contain the correct carriage-return / line-feed token.
You'll need to replace the linefeeds with the correct "\r\n" sequence.

Signature

Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

> Hi to all,
>
[quoted text clipped - 14 lines]
>
> DevX
DevX - 26 Sep 2005 10:16 GMT
Bob, Thanks for your reply.

The input is managed in another application that (I think) simply furnish a
text box to enter the string. I don't control this application but I can try
to ask to the relative developer.

I just want ask some questions:

1) Why on Windows Server 2003 I don't have this problem (In this machine I
have installed the western charset + simplified chinese...I don't know if
this count)
2) How is possible to resolve the problem in the read/display side of our
applications?

Thanks a lot again.

Dev

> Your strings don't contain the correct carriage-return / line-feed token.
> You'll need to replace the linefeeds with the correct "\r\n" sequence.
[quoted text clipped - 17 lines]
> >
> > DevX

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.