One of the main goals of the Birthday Program (page 70) is to show you a more complex control that is so complete that it's like a subsystem you can drop right into your program. A control is one of the most important types of Object that is used in VB.NET and this is a great time to tie together where the main components of an Object can be found. Consider this simplified statement from the Birthday Program.
~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Button1_Click( _
ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
MsgBox(DateTimePicker1.Value.DayOfYear.ToString)
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~
The key items are:
- Objects:
DateTimePicker1 and Button1 - Properties:
Value and DayOfYear - A Method:
ToString - An Event:
Click
(this is a Button event, however, not a DateTimePicker event)
Once you really get the concept of where these things can be found and how to use them, you've got most of the new object oriented VB.NET!
Let's consider these one at a time.
First, the objects. Objects can come from a number of places and it's a bit too early in this course to try to cover them all. These objects are called components and came from the Toolbox. Keep in mind that the Toolbox is just something that Visual Studio uses to organize components and make them easier to use.


