"Cath Victor" <ca**@cathyvictor.com> schrieb
I have a windows form that calls/uses a class to do some processing.
I want this class to return values or append text to the form's
textbox as it processes data. Any of you guys know how I could do
this?
I was already able to do this before but unfortunately, my code has
been deleted and I can't reconstruct it.
In the class, raise an event. In the Form, handle the event and update the
display. It you don't need to use the Form during the process, it is
sufficient to call the Refresh method of the controls that need to be
refreshed.
ATTENTION: Using WinXP, calling the Refresh method does not refresh the
control after a couple of seconds. Reason: (3rd paragraph)
http://msdn.microsoft.com/library/en...sagequeues.asp
This annoying "feature" can not be turned off (AFAIK)! There is no way to
update the display only. Either you have to use Application.Doevents (which
also enables the user to interact with the Form - what you might not want),
or you have to do the job in a new thread.
--
Armin
http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html