TextAlign uses a tool that is new in VB.NET. Rather than just a drop-down list where the words "Middle Center" are selected, a graphical image is used to make the selection:
Timesaving Tip:
When you're entering code such as:
~~~~~~~~~~~~~~~~~~~~~~~~~
Label1.Text = TimeString
~~~~~~~~~~~~~~~~~~~~~~~~~
and
~~~~~~~~~~~~~~~~~~~~~~~~~
Label1.Text = DateString
~~~~~~~~~~~~~~~~~~~~~~~~~
you can save a lot of typing (and typing errors) by copying the code from one place to another. Simply select the text, and then using Ctrl-Click and Drag, copy it to a new location. After that all you have to do is change "Time" to "Date" in the new lines of code.
Understanding the Tool Tip:
The behavior of Access Keys, described in Chapter 4, causes a lot of confusion with programmers. The best way to understand it is to practice with the access keys in VB.NET itself. Let's look at just one access key in VB.NET, selected more or less at random as an example.
Notice that C is an access key in both the File and Edit menu. In File, C is the key to Close while in Edit, C is the key to Copy. So, if you click Alt-C, what happens? Answer: Nothing. There is no C access key in the top menu. You have to click and release the Alt key, and then click either F-C or E-C to to trigger the proper action in Windows XP.


