Slide effect on a panel without that lag

1

My question is this: How do I remove that lag that causes when a Panel / Button (etc) is updated by the Controle.Update() method? This is why I use it to make the slide effect, but this effect is low, resulting in slow and ugly animation. Here is my code, considering Panel2 the panel I want the animation:

 For x% = 0% To +200 Step +4
     Panel2.Width = x : Panel2.Update() 
 Next

But it's no use, I want a beautiful animation, lag-free, smooth, like a mobile menu. Any ideas?

    
asked by anonymous 28.06.2015 / 04:59

1 answer

1

Hello, CyberPotato! I tested your code and it did not show any lag ... Is your Panel inside some other component? Make sure that the Panel is not in some image ... this generates a lot of lag. Do not use the "Update" property for this type of task. Look at the example below.

For x = 0 To 100

    Panel2.Width = x
Next
    
05.07.2015 / 03:56