Raise an Event?

Can anyone tell me how to raise an event so that the OnBufferSwap is called? I am attaching a basic VB.NET example that uses OpenGL to draw a square.

SolidworksApi macros