Creating an About Dialog with Assembly Attributes
About dialogs are pretty common. In this section I will demonstrate how to use Reflection to read assembly-level attributes (Listing 5.4), and then you can imagine how those capabilities might have been used to create the FileVersionInfo class. The FileVersionInfo class was used to create the About dialog in Figure 5.2, and the code is provided in Listing 5.5.
Figure 5.2. The About dialog example. (The graphic image was created using Bryce 5.)
Listing 5.4. Obtaining Application Information by Using Reflection
1: Option Explicit On 2: Option Strict On 3: 4: Imports System.Reflection 5: Imports ... |
Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.