I want to avoid flickering in the panel of my application after you sent a search query from 4 months ago , after you tried subclassing the panels, after you asked here two or three times, after you asked others forums ... no one has a solution, but today I found a solution miraculously in this last answer: Is this a way to stop the image from flickering when resizing?
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
Now I want to know what these lines of code really do. I need to understand what this code does for my application,
is a good way to avoid flickering?
MSDN says:
"The CreateParams property should not be overridden and used to configure the properties of your derived control."
but why not ?, this is the only way I found that my panel is flickering, so I want to know more about the code I wrote above, I want to understand all the orders, as well as the advantages of this sub and negatives, everything is welcome ...
Can anyone explain me more about this code?
UPDATE:
I tested the “flickering solution” in all my applications and yes, this is a flickering solution ... but it has a negative point, because my programs rotate -200% faster, I mean when I use this overriding sub-program, the programs become much slower, than x6 times slower, so overriding sub is not recommended, as it is.
Does anyone know if I can avoid flickering without prior notice to my application?