Hi Jorge,
In VB that is
Public Sub MyMethod()
AddHandler Application.ThreadSuspend, AddressOf Application_ThreadSuspend
End Sub
Private Sub Application_ThreadSuspend(ByVal sender As Object, ByVal e As EventArgs)
CType(VWGContext.Current, IContextTerminate).Terminate(True)
End Sub
If put a button on a page and click it then when the user clicks it the button.click event is fired.
We can also fire an event by using the Raise Event.
To find out more about raising events see the following MSDN page
http://msdn.microsoft.com/en-us/library/wkzf914z(VS.71).aspx
Jay