Advanced Visual Basic 2010 Chapter 6 Programming Challenge 9 Weather Station Summary
The purpose of this programming challenge is to show how events raised by a class can be broadcast to more than one class. Use the Weather Station Events application from Tutorial 6-7 as a starting point for this programming challenge. Create a Summary form, as shown in Figure 6-29, that keeps a running count of each type of event raised by the WeatherStation class. The Summary form’s class contains an event handler for each type of event raised by the WeatherStation class. Just before showing the Summary form, the main form can pass to it a reference to the same WeatherStation object declared at the top of the main form. Use the Show (not ShowDialog) method to display the Summary form. As events appear on the main form, the summary form counts the number of each type of event that has been raised so far.