Link to home
Start Free TrialLog in
Avatar of desiredforsome
desiredforsome

asked on

C# inoke not working

this is my code line

base.Invoke(() => PictureBox pictureBox6.Image = new Bitmap(bitmap, pictureBox6.Size));

its not working telling me its missing items

any idea to correctly format this?
Avatar of desiredforsome
desiredforsome

ASKER

this is required to invoke the picturebox when putting in the image in order to avoid threading crash.
try with:
base.Invoke(() => { PictureBox pictureBox6.Image = new Bitmap(bitmap, pictureBox6.Size); });
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect worked first time. Thank you soo much.