You probably deduced in the previous sections that it must be possible to “listen to” certain application events. DotNetCopy, for example, latches itself to the program start event, and even controls the way in which the program works, based on options you pass via the command line.
To designate that your own code runs when these application events occur, you need to perform some prep-work:
Open the project properties, and then select the Application tab.
Click the View Application Events button (see Figure 23-1).
The Visual Studio IDE immediately generates and adds a code file named ApplicationEvents.vb to your project, and then opens it in the Editor. ...