I have a custom control's library. Now there's a control which looks like a panel, and when it opens up I want to animate its vertical growing like this:
For h As Single = 0 To finalHeight Step 0.5
Me.Height = CInt(h)
' HERE I WANT TO CALL DoEvents'
Next
Me.Height = finalHeight
If I don't call DoEvents in the loop then the animation is not shown, I only get the final height without a visual feedback along the way.
I can call DoEvents from inside my main WinForm project, but can't inside a library.
How can I do that, without drowning into the deep threads waters?