Hi group,
I have a form with a textbox control on it. I am using the textbox
control with multiline enabled to output the 'log' information for a
long process I am running. My problem is that it all works fine until
the limit of the size of text is reached for the text box. This causes
the textbox to stop update whilst the thread running the process
continues.
Any ideas how I can expand the functionality of the textbox to accept
larger amounts of data? I tried a richtextbox but it gives me the same
problem. Failing that, any ideas of a different control I could use
instead that comes with VB 2003?
I cannot use a listbox because I need the user to be able to highlight
sections of text or parts of text on one line and copy them to the
clipboard.
TIA 12 1356
"Hugh Janus" <my************ *@hotmail.com> schrieb: I have a form with a textbox control on it. I am using the textbox control with multiline enabled to output the 'log' information for a long process I am running. My problem is that it all works fine until the limit of the size of text is reached for the text box. This causes the textbox to stop update whilst the thread running the process continues.
Any ideas how I can expand the functionality of the textbox to accept larger amounts of data? I tried a richtextbox but it gives me the same problem. Failing that, any ideas of a different control I could use instead that comes with VB 2003?
Which amount of data are you writing to the control? Note that the machine
only has a limited memory. In addition to that, make sure you use
'Control.Invoke Required', 'Control.Invoke '/'Control.BeginI nvoke' to update
the control from another thread instead of accessing it directly, which will
cause problems because instance members of Windows Forms controls are not
safe for multithreading.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
> Which amount of data are you writing to the control? Note that the machine only has a limited memory. In addition to that, make sure you use 'Control.Invoke Required', 'Control.Invoke '/'Control.BeginI nvoke' to update the control from another thread instead of accessing it directly, which will cause problems because instance members of Windows Forms controls are not safe for multithreading.
It is not that much text, should not grow to more than 1 or 2 mb's of
pure text if it was saved as a text file in notepad, so memory should
not be a problem as far as I can tell. 2mb's is far greater than what
the Textbox or Richtextbox control can handle though. Any ideas?
p.s. I am using invoke to update the control already! thanks!
Hugh Janus wrote: Which amount of data are you writing to the control? Note that the machine only has a limited memory. In addition to that, make sure you use 'Control.Invo keRequired', 'Control.Invoke '/'Control.BeginI nvoke' to update the control from another thread instead of accessing it directly, which will cause problems because instance members of Windows Forms controls are not safe for multithreading.
It is not that much text, should not grow to more than 1 or 2 mb's of pure text if it was saved as a text file in notepad, so memory should not be a problem as far as I can tell. 2mb's is far greater than what the Textbox or Richtextbox control can handle though. Any ideas?
p.s. I am using invoke to update the control already! thanks!
The textbox can easily handle that... unless you're running Win9x.
--
Rinze van Huizen
C-Services Holland b.v
I am running Windows XP. The textbox just stops scrolling after a
while and no new information is added. I thought that the limit was
32k???
"Hugh Janus" <my************ *@hotmail.com> schrieb: I am running Windows XP. The textbox just stops scrolling after a while and no new information is added. I thought that the limit was 32k???
IIRC, 'AppendText' and 'SelectionStart ' are still limited to 32 KB.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
That is preciesely what I am using. AppendText. Upon further testing,
it seems that RichTextBox it works OK (I guess when I originally tested
one I had an error in my code). The problem with a RTB is that it does
not scroll automatically. So, I use the ScrollToCaret method but it is
not very reliable.
I guess I'll have to work out some 'cheat' for scrolling the RTB.
Thanks.
"Hugh Janus" <my************ *@hotmail.com> schrieb: I guess I'll have to work out some 'cheat' for scrolling the RTB.
Adding a line to a richtextbox control and scrolling it into view
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=richtextbox scrolltobottom& lang=en>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Herfried K. Wagner [MVP] wrote: "Hugh Janus" <my************ *@hotmail.com> schrieb: I guess I'll have to work out some 'cheat' for scrolling the RTB.
Adding a line to a richtextbox control and scrolling it into view <URL:http://dotnet.mvps.org/dotnet/faqs/?id=richtextbox scrolltobottom& lang=en>
:-) Thanks a lot! I'll give that a try!
Herfried K. Wagner [MVP] wrote: "Hugh Janus" <my************ *@hotmail.com> schrieb: I guess I'll have to work out some 'cheat' for scrolling the RTB.
Adding a line to a richtextbox control and scrolling it into view <URL:http://dotnet.mvps.org/dotnet/faqs/?id=richtextbox scrolltobottom& lang=en>
If the .Enabled is set to False on the RTB, how could I scroll it??
Or, is there an alternative way of stopping the user from interacting
with the RTB but still have it scrolling? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matik |
last post by:
Hello all,
I've following problem. Please forgive me not posting script, but I
think it won't help anyway.
I've a table, which is quite big (over 5 milions records). Now, this
table contains one field (varchar), which contains some data in
the chain.
Now, there is a view on this table, to present the data to user. The
|
by: jacob navia |
last post by:
As everybody knows, C uses a zero delimited unbounded
pointer for its representation of strings.
This is extremely inefficient because at each query of the
length of the string, the computer starts an unbounded
memory scan searching for a zero that ends the string.
A more efficient representation is:
struct string {
|
by: tshad |
last post by:
I have a cell with 2 items in it: a textbox and a link.
The link is actually a button (image), but for the example I am using a
link, which is doing the same thing.
Here is the stripped down version of my page that shows the problem:
***********************************************************************************
<html>
<head></head>
|
by: Peter |
last post by:
I hate using the mask edit conrol so I created these two function to
format my phone numbers. Is there a way to consolidate these two
functions into one?
In this example say the textbox you want to format is named "txtTest"
I would format it in this fashion:
in the onchange event:
'Formats the text on entry
txtTest.text = FormatPhoneNumber(sender, txtTest.text)
|
by: Joe Lester |
last post by:
I installed Postgres 7.4.1 on a dual processor G5 running Mac OS
10.3.2. I'm trying to increase the max_connections to 300 and running
into some trouble. If anyone could shed some light, I'd greatly
appreciate it.
Here's part of my postgresql.conf:
# - Connection Settings -
tcpip_socket = true
max_connections = 300
| |
by: Joseph Geretz |
last post by:
I'm developing a Web Service using DIME to download and upload files from
and to an IIS server. In order to increase the download filesize to
unlimited, I have the following block in my App.config and Web.config files:
<messaging>
<maxRequestLength>-1</maxRequestLength>
</messaging>
The largest file I've downloaded is 70 meg and that's more than plenty for
me. However, I'm finding that on upload, if I attempt to upload greater than
|
by: Rahul B |
last post by:
Hi,
I was getting the error: sqlcode: -911 sqlstate: 40001 , which is
"The maximum number of lock requests has been reached for the
database."
So i increased the locklist size to 200 from the default value of 100.
I wanted to know what other effects it will have on the database?
Like, will the performance reduce, if the locklist size is 200 and 120
locks are on it as compared to when the locklist size is 130 and 120
|
by: weg22 |
last post by:
Hi all,
I need to impose maximum and minimum numerical limits on a textbox.
I'd prefer not to code these in (since I have many textboxes and the
limits on each are different) and was wondering if there is any way to
do this within the textbox properties?
For example, I know the "NumericUpDown" has maximum and minimum
properties so that you can specify a range. This would be perfect,
however, I'm not a fan of the up/down arrows on the...
|
by: Josip |
last post by:
I'm trying to limit a value stored by object (either int or float):
class Limited(object):
def __init__(self, value, min, max):
self.min, self.max = min, max
self.n = value
def set_n(self,value):
if value < self.min: # boundary check
self.n = self.min
if value self.max:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |