private void xdlambda(DisplayPanel p, bool b) { if (p.InvokeRequired) { p.Invoke(new Action(() => xdhelper(p, b))); } else { xdhelper(p, b); } }