简体   繁体   English

Windows窗体在桌面上移动时创建轨迹

[英]windows form creates trail on moving on desktop

I have developed a windows form application using c#. 我已经使用c#开发了一个Windows窗体应用程序。 And now when I move the that form on desktop a very large trail appears. 现在,当我在桌面上移动该表单时,会出现一个非常大的痕迹。 Its like when we move any window like notepad when system is overloaded. 就像我们在系统超载时移动记事本之类的任何窗口时一样。 But when system is working fine. 但是当系统运行良好时。 no overload still the trail appears. 没有过载仍然出现踪迹。 which doesn't look good. 看起来不太好 so is there any way to avoid that. 所以有什么办法可以避免这种情况。 My system RAM is 2GB! 我的系统内存是2GB!

Do you use large pictures on winform? 您在winform上使用大图片吗?

You can try this: Try to set the Double buffered property of the form. 您可以尝试以下操作:尝试设置表单的Double buffered属性。

or 要么

Maybe you can solve with this code: 也许您可以使用以下代码解决:

protected override CreateParams CreateParams {
get {
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED
return cp;
  }
}

And finally you can try to set this property of the form : Transparency key with a color which you don't use on your form. 最后,您可以尝试设置表单的此属性: 透明键 ,其颜色不要在表单上使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM