Problem Updating TextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm writting in VC++.net and my text box is not updating.

The gist of my code goes like this, it uses recursion and everything works, but the text box won't update. If I place a
Message box to check the string I'm using it the text box then displays the result correctly.

void file_copy(String *path)
{
String* number = "Files Left to Copy"
textboxfiles->Text = "Files Remaining;
File::Copy(path, Destination);
.....more code...
file_copy(new path);
}
 
Perhaps you should call Refresh method on TextBox or the form holding it.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

clark said:
I'm writting in VC++.net and my text box is not updating.

The gist of my code goes like this, it uses recursion and everything
works, but the text box won't update. If I place a
 
I've tried doing this and the same result. I just trie refreshing the form, though, but it also didn't work. It seems that
the copy task gets the most priority, because if I try clicking on the form, I get a message from windows that the form is not responding. (Though if I wait, the files all get copied and the form does let me know it is done.)
 
Hi Clark,

Clark said:
I've tried doing this and the same result. I just trie refreshing the
form, though, but it also didn't work. It seems that
the copy task gets the most priority, because if I try clicking on the
form, I get a message from windows that the form is not responding. (Though
if I wait, the files all get copied and the form does let me know it is
done.)

Yes, that's normal behaviour.
You might move your copy routing to another thread by using delegates.
See (there are three parts).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms06112002.asp
The article is written for C# - I hope you'll be able to use it.

--
Miha Markic - DXSquad/RightHand .NET consulting & software development
miha at rthand com www.rthand.com

Developer Express newsgroups are for peer-to-peer support.
For direct support from Developer Express, write to (e-mail address removed)
Bug reports should be directed to: (e-mail address removed)
Due to newsgroup guidelines, DX-Squad will not answer anonymous postings.
 
Thank-you for your help. That seems to be what the problem is. I'm working on trying to get this coded in C++.
 
Back
Top