VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the
amount of text in the textbox to 32K.
I have a short program that uses the GetFiles function of the directory
object, then iterates through the returned array and appends the strings to
the textbox. However, if the character count is greater than 32k, no
additional text is displayed in the textbox, though no error is raised.
dim StartDir as Directory
dim AllFiles() as String
AllFiles = StartDir.GetFiles("C:\Windows\System32")
'The following method works fine:
'Textbox1.Lines = AllFiles
'This method displays the problem.
dim TempString as String
For Each TempString in AllFiles
TextBox1.AppendText(TempString & ControlChars.CrLf)
Next
I can't find this documented anywhere, so assume it must be a bug. Anyone
have a similar experience, or know a workaround? 7 6868
Hi,
That is all the info a textbox can hold. Use a richtextbox instead.
Ken
-------------------
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.com...
VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the
amount of text in the textbox to 32K.
I have a short program that uses the GetFiles function of the directory
object, then iterates through the returned array and appends the strings to
the textbox. However, if the character count is greater than 32k, no
additional text is displayed in the textbox, though no error is raised.
dim StartDir as Directory
dim AllFiles() as String
AllFiles = StartDir.GetFiles("C:\Windows\System32")
'The following method works fine:
'Textbox1.Lines = AllFiles
'This method displays the problem.
dim TempString as String
For Each TempString in AllFiles
TextBox1.AppendText(TempString & ControlChars.CrLf)
Next
I can't find this documented anywhere, so assume it must be a bug. Anyone
have a similar experience, or know a workaround?
That's a known bug:
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
"Andrew" <An****@discussions.microsoft.com> schrieb im Newsbeitrag
news:A2**********************************@microsof t.com... VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the amount of text in the textbox to 32K.
I have a short program that uses the GetFiles function of the directory object, then iterates through the returned array and appends the strings to the textbox. However, if the character count is greater than 32k, no additional text is displayed in the textbox, though no error is raised.
dim StartDir as Directory dim AllFiles() as String
AllFiles = StartDir.GetFiles("C:\Windows\System32")
'The following method works fine: 'Textbox1.Lines = AllFiles
'This method displays the problem. dim TempString as String For Each TempString in AllFiles TextBox1.AppendText(TempString & ControlChars.CrLf) Next
I can't find this documented anywhere, so assume it must be a bug. Anyone have a similar experience, or know a workaround?
"Andrew" <An****@discussions.microsoft.com> schrieb: VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the amount of text in the textbox to 32K.
That's a known bug:
<URL:http://groups.google.com/groups?selm=Ox0wQkDTDHA.2188%40TK2MSFTNGP10.phx.gb l>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Why can't you add the files to a ListBox?
Dim strSystemDirectory As String =
Environment.GetFolderPath(Environment.SpecialFolde r.System)
ListBox1.Items.Clear()
For Each strFile As String In
IO.Directory.GetFiles(strSystemDirectory)
ListBox1.Items.Add(strFile)
Next
Crouchie1998
BA (HONS) MCP MCSE
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.com... VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the amount of text in the textbox to 32K.
I have a short program that uses the GetFiles function of the directory object, then iterates through the returned array and appends the strings
to the textbox. However, if the character count is greater than 32k, no additional text is displayed in the textbox, though no error is raised.
dim StartDir as Directory dim AllFiles() as String
AllFiles = StartDir.GetFiles("C:\Windows\System32")
'The following method works fine: 'Textbox1.Lines = AllFiles
'This method displays the problem. dim TempString as String For Each TempString in AllFiles TextBox1.AppendText(TempString & ControlChars.CrLf) Next
I can't find this documented anywhere, so assume it must be a bug. Anyone have a similar experience, or know a workaround?
Argh. I wish they would have posted this in the KB somewhere. I spent hours
trying to track this down, and since the documentation omits Windows XP (but
mentions every other OS for the past 10 years), I had to question whether or
not it was the code causing the problem. Thanks Herfried.
"Herfried K. Wagner [MVP]" wrote: "Andrew" <An****@discussions.microsoft.com> schrieb: VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the amount of text in the textbox to 32K.
That's a known bug:
<URL:http://groups.google.com/groups?selm=Ox0wQkDTDHA.2188%40TK2MSFTNGP10.phx.gb l>
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
I have to disagree with you, Ken. If I set the Text property of a textbox to
a string with 50,000 characters in it, it displays properly in the text box.
However, if I used the AppendText method to display the same string in the
text box, it would truncate to 32K characters.
-Andrew
"Ken Tucker [MVP]" wrote: Hi,
That is all the info a textbox can hold. Use a richtextbox instead.
Ken ------------------- "Andrew" <An****@discussions.microsoft.com> wrote in message news:A2**********************************@microsof t.com... VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the amount of text in the textbox to 32K.
I have a short program that uses the GetFiles function of the directory object, then iterates through the returned array and appends the strings to the textbox. However, if the character count is greater than 32k, no additional text is displayed in the textbox, though no error is raised.
dim StartDir as Directory dim AllFiles() as String
AllFiles = StartDir.GetFiles("C:\Windows\System32")
'The following method works fine: 'Textbox1.Lines = AllFiles
'This method displays the problem. dim TempString as String For Each TempString in AllFiles TextBox1.AppendText(TempString & ControlChars.CrLf) Next
I can't find this documented anywhere, so assume it must be a bug. Anyone have a similar experience, or know a workaround?
I could, but the point of the post wasn't so much to illustrate a particular
need as it was to demonstrate what I presumed must be a limitation of the
TextBox object.
The actual code where this was discovered was a bit more tedious, but the
code I posted here was just to demonstrate the problem.
-Andrew
"Crouchie1998" wrote: Why can't you add the files to a ListBox?
Dim strSystemDirectory As String = Environment.GetFolderPath(Environment.SpecialFolde r.System)
ListBox1.Items.Clear() For Each strFile As String In IO.Directory.GetFiles(strSystemDirectory) ListBox1.Items.Add(strFile) Next
Crouchie1998 BA (HONS) MCP MCSE
"Andrew" <An****@discussions.microsoft.com> wrote in message news:A2**********************************@microsof t.com... VB .NET 2003, WinXP Pro:
Adding text to a text box with the TextBox.AppendText method limits the amount of text in the textbox to 32K.
I have a short program that uses the GetFiles function of the directory object, then iterates through the returned array and appends the strings to the textbox. However, if the character count is greater than 32k, no additional text is displayed in the textbox, though no error is raised.
dim StartDir as Directory dim AllFiles() as String
AllFiles = StartDir.GetFiles("C:\Windows\System32")
'The following method works fine: 'Textbox1.Lines = AllFiles
'This method displays the problem. dim TempString as String For Each TempString in AllFiles TextBox1.AppendText(TempString & ControlChars.CrLf) Next
I can't find this documented anywhere, so assume it must be a bug. Anyone have a similar experience, or know a workaround? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Wootaek Choi |
last post by:
I've tried to record some data to the file with C#.
The data should be added in the end of log file,
And If there is no log file, A new log file should be created to write
the data
for that...
|
by: Cordell Lawrence |
last post by:
Okay guys,
We are wondering if this is a bug in Framework 2.0.40607 and
looking for some clarification on the issue. Take a look at the folowing
code.
public delegate bool BoundryTest(int...
|
by: Paul E Collins |
last post by:
I'm writing an application with a TextBox control on its main form.
I'm running the application under WinXP Pro, so (as I understand it)
there should be no practical limit to the number of...
|
by: Tamir Khason |
last post by:
I have textbox. I do something in each Keypress (kindof validation) in order
not to rewrite all text inside I'm using AppendText method to write in. BUT
I'm unable to add backspace (\b); e.g I have...
|
by: Ron |
last post by:
Greetings,
I am writing text to a multi line textbox on a timer as
follows:
txt1.AppendText(@"/* " + DateTime.Now.ToString() + "\n");
Here is what gets displayed
/* 1/1/2004 11:12:11 AM|
|
by: dc15 |
last post by:
I am trying to write an application, taking input from various text
boxes and appending it to a text file.... it was working, then I had to
create various sub procedures to reflect limits set in...
|
by: Fritz Switzer |
last post by:
I'm trying to AppendText to a TextEdit. I have a procedure that will
go through the controls on a Windows form and return the control that has
"focus".
I have a number of TextEdits on my form...
|
by: geo039 |
last post by:
I have a mortage calculator in vb.net. I am trying to transferring it into asp.net. Most of everything works from cut and paste except appendtext. I am not sure what to use in place of the...
|
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= |
last post by:
Hello,
I have a multiline RichTextBox that I use for data logging. I'm concerned
about how the AppendText method reacts when over time the maximum number of
characters have been added. Do the...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| | |