if (b->InvokeRequired) {
FuncDelegat^ as = gcnew FuncDelegat(funct1);
b->Invoke(as,nullptr);
return;
}
Why that code may not the call function funct1
if (b->InvokeRequired) {
FuncDelegat^ as = gcnew FuncDelegat(funct1);
b->Invoke(as,nullptr);
return;
}
Why that code may not the call function funct1
funct1 is not called if InvokeRequired returns false. Correct way:
if (b->InvokeRequired) { FuncDelegat^ as = gcnew FuncDelegat(funct1); b->Invoke(as,nullptr); } else { b->funct1(nullptr); } return;