public void ShowOpaqueLayer() { if (MyControl.InvokeRequired) { MyFunc f = ShowOpaqueLayer; MyControl.Invoke(f, null); } else { cmd.ShowOpaqueLayer(MyControl, Alpha, IsShowLoadingImage); } }