winforms - BeginInvoke() giving errors in my C# code -
i trying implement begininvoke() in code , came across part throwing error.
private void showpiclensplot() { if (piclensplot.invokerequired) { piclensplot.begininvoke(new action<control, bool>(showpiclensplot, piclensplot, true)); } else { piclensplot.bringtofront(); } }
the error methodname expected above source code has been converted c# vb , online tool used to this. piclensplot private system.windows.forms.picturebox piclensplot;
this should work:
if (piclensplot.invokerequired) { piclensplot.begininvoke(new action(() => showpiclensplot())); } else { piclensplot.bringtofront(); }
Comments
Post a Comment