0

I found the following code which cancels the flickering in a WinForms application:

Protected Overrides ReadOnly Property CreateParams() As CreateParams
    Get
        Dim cp As CreateParams = MyBase.CreateParams
        cp.ExStyle = cp.ExStyle Or &H2000000
        Return cp
    End Get
End Property 'CreateParams

The issue comes when "minimizing and maximizing the form, all controls are invisible. Removing &H2000000 fix the problem, but the controls start to flicker" like it says in this comment on this question.

There's any update or way to solve this?

fpuglap
  • 109
  • 1
  • 2
  • 15
  • I just put a bounty on the [older question](https://stackoverflow.com/q/43581224/832052). If it gets an answer we should close your question because it's basically an exact duplicate. Let's see if someone can answer it. – djv Apr 01 '20 at 19:06
  • @djv Perfect! Thanks. – fpuglap Apr 01 '20 at 19:42
  • @djv No one answered the question after one week. Maybe this is a bug of VS 2019. – fpuglap Apr 10 '20 at 00:26
  • @HansPassant Hi Mr. Nobody :) I was making reference that no one posted an answer, just comments. Now if I must take your comment as an answer then Microsoft is completely broken and VS it's obsolete. – fpuglap Apr 20 '20 at 17:28
  • @HansPassant After a few hours of research I found [this question](https://stackoverflow.com/questions/2612487/how-to-fix-the-flickering-in-user-controls). It seems that the person who [answered it](https://stackoverflow.com/a/2613272/8933039) (giving a solution) knew what he was talking about. – fpuglap Apr 22 '20 at 18:13
  • @HansPassant Ten years later he answers the same question again but this time without giving a solution to the problem posed. "When a problem has no solution, it's solved", said an old mentor. So I would like to know if would be properly to migrate the entire WinForm application to WPF or change something that could improve the functionality. Thanks for share your knowledge. – fpuglap Apr 22 '20 at 18:14

0 Answers0