簡體   English   中英

VB.Net面板閃爍

[英]VB.Net Panel Flicker

我有一個帶有線條形狀的自定義控件。 該控件在我的面板中。 每當我在面板上水平滾動時,控件的行就會非常嚴重地閃爍。 我一直在努力尋找解決方案,並討論了許多其他論壇和問題,但仍然沒有找到適合我的答案。

我認為這是winforms,因為您沒有wpf標記。 如果是這樣-試試這個-可能會有幫助。 這有助於解決我遇到的閃爍問題。

您可以在此處閱讀有關內容: 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM