Animate in OpenGL

Hello,

   I am trying to do an animation in OpenGL. I took some sample code from a previous discussion and tried to add events to it. Right now the attached VB.NET 2005 solution works the following way:

When you click on the menu item OpenGL, nothing happens.

As soon as the the user rotates the view (I use middle mouse button) a shaded square appears.

As the user holds down the middle mouse button and keep moving the mouse the square grows and shrinks.

As soon as the user stops moving the mouse it stops changing the size of the shaded square.

What I want to do is that when a user clicks on the menu item the square grows and shrinks on its own.

I assume that if I saw how a user did this I could add a menu item to stop the animation.

My problem is that I don't understand how events work well enough to understand how to implement an animation that runs on its own. I imagine it has something to do with RaiseEvent but I don't know where to put it to make it work.

Can anyone help?

I imagine that this would be really useful for a lot of people - both users that want to understand events and users that want to play with OpenGL (I think it is REALLY cool!).

Thanks so much!

SolidworksApi macros