C# 在创建窗口句柄之前,不能在控件上调用 Invoke 或 BeginInvoke错误的解决办法

  • Post author:
  • Post category:其他


在使用

this.Invoke((MethodInvoker)delegate

{


this.PicScreenProtection.Refresh();

});

的地方改为:

if (this.IsHandleCreated)

{

this.Invoke((MethodInvoker)delegate

{


this.PicScreenProtection.Refresh();

});

}





版权声明:本文为lnc2003原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。