Managing an Event Source

The EventLog class is a component in the System.Diagnostics namespace. You can add an EventLog object to your application by using an Imports System.Diagnostics statement in your module (or the Imports view of the project's Properties Pages) and instantiating an instance of the EventLog class, or you can pick the EventLog component from the Components tab of the toolbox (see Figure 20.1).

Figure 20.1. Selecting the EventLog component from the Components tab of the toolbox.

When creating an EventLog object, you will need to register your application as an event source. Registering your application as the source allows you ...

Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.