O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a Code File to Handle Application Events (Start, End, Network Status, Global Exceptions)

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:

  1. Open the project properties, and then select the Application tab.

  2. 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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required