Welcome to TechIMO!
Both what vass suggested would work. It is not smart to read a value directly out of a normal textbox that is not read-only, so you need to use a variable or a non-user text box like Vass suggested.
Assuming your text box is already set up, it might look something like this:
In psuedocode (this won't run, it is just to get the idea, and you have to interpret it to
VB):
class clicksProgress{
int clicks;
int boxNumber;
void textboxUpdateEvent(){
boxNumber = system::convert::toInt16(textbox->text);
//If this is not a number, you will need to catch errors here too
updateProgressBar();
}
void clickEvent(){
clicks++;
updateProgressBar();
}
void updateProgressBar(){
//I don't know any of the functions for progress bar, sorry just set it here...
progressbarStatus = clicks/boxNumber;
}
Hope that helps!
What are you trying to do with the carriage return? Let somebody type it in, or display something with a CR in it? You can just put it in the textbox by using something like
textbox->text = System::String("The n is a windows endline CR + LF \n");
If you are trying to capture it, it might help to know carriage return is ascii number 13.