我正在使用 .net framework 4 和 Visual Studio 2010。我正在使用 C++ 表单。我的代码是这样的:
int k = 0;
void writeFunction(int &k){
++k;
textbox1->text = Convert::toString(k);
//i want to suspend writeFunction in there, until i click the button1 which is on Form1
//because i don't want to stop function, it has to wait to click
//after i clicked the button1 , the program continue to run code here
writeFunciton(k);
}