-
April 15th, 2012, 10:05 AM
#1
[RESOLVED] How to use Picturebox's Invoke method in C++
Hi,
The language that I'm using is C++. I have a backgroundworker to prevent my UI from crashing. However, within the background function I need to update my UI. I read that using the control's Invoke will do the trick. However, I can't seem to make it work. The code is as follows:
pictureBox2->Invoke((MethodInvoker^) delegate(){
pictureBox2->Image = btmp;
pictureBox2->Update();
});
error C2065: 'delegate' : undeclared identifier
error C2143: syntax error : missing ')' before '{'
error C2143: syntax error : missing ';' before '{'
error C2059: syntax error : ')'
Any ideas? Thanks! Any help would be greatly appreciated!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|