[英]VB.Net Panel Flicker
I have a custom control with line shapes on it. 我有一个带有线条形状的自定义控件。 This control is in my panel.
该控件在我的面板中。 Whenever I scroll horizontally on the panel, my control's lines flicker very badly.
每当我在面板上水平滚动时,控件的行就会非常严重地闪烁。 I've been trying to find a solution to this and have looked at many forums and questions by others, but still haven't seen an answer that works for me.
我一直在努力寻找解决方案,并讨论了许多其他论坛和问题,但仍然没有找到适合我的答案。
I assume this is winforms as you do not have a wpf tag. 我认为这是winforms,因为您没有wpf标记。 If so - try this - it may help.
如果是这样-试试这个-可能会有帮助。 This helped with a flickering problem I had.
这有助于解决我遇到的闪烁问题。
You can read about it here: http://www.vbmigration.com/detknowledgebase.aspx?Id=692 您可以在此处阅读有关内容: http : //www.vbmigration.com/detknowledgebase.aspx?Id=692
Protected Overrides ReadOnly Property CreateParams() As CreateParams
'this is magic code that has an enormous positive effect on reducing flickering.
'don't remove this.
'found this nugget here: http://www.vbmigration.com/detknowledgebase.aspx?Id=692
Get
Dim params As CreateParams = MyBase.CreateParams
params.ExStyle = params.ExStyle Or &H2000000
Return params
End Get
End Property
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.