This post originated from an RSS feed registered with .NET Buzz
by Duncan Mackenzie.
Original Post: Early & Adopter fill you in on "Application Level Events"
Feed Title: Code/Tea/Etc...
Feed URL: /msdnerror.htm?aspxerrorpath=/duncanma/rss.aspx
Feed Description: Duncan is the Visual Basic Content Strategist at MSDN, the editor of the Visual Basic Developer Center (http://msdn.microsoft.com/vbasic), and the author of the "Coding 4 Fun" column on MSDN (http://msdn.microsoft.com/vbasic/using/columns/code4fun/default.aspx). While typically Visual Basic focused, his blogs sometimes wanders off of the technical path and into various musing of his troubled mind.
Here's a code snippet to illustrate what they are talking about... something that I like to think of as "Global.asa" (I haven't done a lot of web work since ASP) for Windows applications...
Namespace My Partial Friend Class MyApplication Private Sub MyApplication_Shutdown(ByVal Sender As Object, _ ByVal e As System.Windows.Forms.ShutdownEventArgs) _ Handles Me.Shutdown End Sub
Private Sub MyApplication_StartUp(ByVal sender As Object, _ ByVal e As System.Windows.Forms.StartupEventArgs) _ Handles Me.Startup End Sub
Private Sub MyApplication_StartupNextInstance(ByVal Sender As Object, _ ByVal e As System.Windows.Forms.StartupNextInstanceEventArgs) _ Handles Me.StartupNextInstance End Sub
Private Sub MyApplication_UnhandledException(ByVal sender As Object, _ ByVal e As System.Threading.ThreadExceptionEventArgs) _ Handles Me.UnhandledException End Sub
End Class
End Namespace
Make sure you check out the whole post for a pretty screenshot :)